[Mapserver-users] getShape() with SDE and PostGIS
Ellis Robin Bundaberg
Robin.Ellis at nrm.qld.gov.au
Tue Feb 3 20:45:22 PST 2004
I'm using PHP mapscript with version 3.6.3 of Mapserver. Using the following mapscript I can successfully return the extent of a polygon from a PostGIS layer, however I can't repeat the success with a similar SDE layer.
$zoomdcdblayer->queryByAttributes(MS_MULTIPLE);
$thenum_results = $zoomdcdblayer->getNumResults();
for ($i=0;$i < $thenum_results; $i++) {
$result = $zoomdcdblayer->getResult($i);
$zoomdcdblayer->open("test");
$rvshape = $zoomdcdblayer->getShape($result->{tileindex}, $result->{shapeindex});
$shpbnd = $rvshape->bounds;
print_r($shpbnd);
$zoomdcdblayer->close();
}
>From my PostGIS layer I get this 'shpbnd' output:
rect Object ( [_handle_] => Resource id #23 [minx] => 152.226563 [miny] => -25.004187 [maxx] => 152.234491 [maxy] => -24.997927 )
But from my SDE layer I get this:
rect Object ( [_handle_] => Resource id #18 [minx] => -1 [miny] => -1 [maxx] => -1 [maxy] => -1 )
The relevant part of my mapfile looks like this:
Postgis Layer
CONNECTIONTYPE postgis
CONNECTION "user=username password=xxxxxxxx dbname=veg"
DATA "geo_value from sedcdb"
SDE Layer
CONNECTION "sdeserver,instance,database,username,xxxxxxxx"
CONNECTIONTYPE sde
DATA "SDEAPP.DCDB,SHAPE"
Does anyone know if getShape is unlikely to work with SDE, or if there is something I need to do to get the correct result?
Thanks
Rob
Robin Ellis
Department of Natural Resources and Mines
PO Box 1167
Bundaberg QLD 4670
ph +61 7 4131 5771
fax +61 7 4131 5823
Robin.Ellis at nrm.qld.gov.au
************************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.
************************************************************************
More information about the MapServer-users
mailing list