getShape does not work with Postgis Layer
Reported by: |
leonardo@… |
Owned by: |
dblasby@… |
Priority:
|
high
|
Milestone:
|
|
Component:
|
PostGIS Interface
|
Version:
|
4.2
|
Severity:
|
normal
|
Keywords:
|
|
Cc:
|
dblasby@…
|
|
|
Hi,
There seems to be a problem with getShape(). When the member function getShape
() is called in a postgis layer, it returns an empty shape object. If the data
source of the layer is a shapefile, it works fine.In this situation, the first
arg (tile index) is -1 and the shapeindex (the oid) is correct.
-----------------
The php code:
$edificiosLayer->open();
$shapeSelect = ms_newShapeObj(MS_POLYGON);
$shapeSelect=$edificiosLayer->getShape($resultObj-
>tileindex,$resultObj->shapeindex);
$edificiosLayer->close();
$shape_chave=$shapeSelect->values['CHAVE'];
--------------
The layer in the mapfile:
LAYER # polygon
NAME almeirim_edificios
STATUS DEFAULT
TYPE POLYGON
CONNECTIONTYPE postgis
CONNECTION "user=nobody dbname=almeirim_geo host=localhost"
DATA "the_geom from almeirim_edificios_table"
HEADER 'querytemplates/edificios_header.html'
FOOTER 'querytemplates/edificios_footer.html'
CLASS
name "Edificios"
COLOR 100 100 190
TEMPLATE 'querytemplates/edificios_query.html'
OUTLINECOLOR 0 0 0
END
END # layer
-------------
Change History
(6)
Cc: |
dblasby@… pramsey@… added
|
Component: |
MapScript-PHP → PostGIS Interface
|
Summary: |
getShape does not work with Postgis Layer → getShape does not work with Postgis Layer
|
Cc: |
mapserver-bugs@… added
|
Owner: |
changed from mapserverbugs to dblasby@…
|
Resolution: |
→ invalid
|
Status: |
new → closed
|