[Geomoose-users] identify service

Sean Ziniker Sean.Ziniker at co.jefferson.or.us
Wed Oct 6 15:24:31 EDT 2010


Len,

 

When I try the code change for latlong I get x:-0, y:0.  I am using
900913 projection and my shapefiles are in an Oregon State Plane.  If I
change the projection portion of the code to my state plane projection I
get values but they are incorrect.  

 

Here is my code change:

 

if($queryShape->type == MS_SHAPE_POINT) {

                                    $point =
$queryShape->line(0)->point(0);

                                    $map->queryByPoint($point,
MS_MULTIPLE, -1);

                                    $clonePoint = $point;

                                    $projOutObj =
ms_newprojectionobj("proj=latlong");

                                    $projInObj =
ms_newprojectionobj("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0
+lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");

                                    $clonePoint->project($projInObj,
$projOutObj);

                                    $substArray['mapx'] =
round($clonePoint->x,4);

                                    $substArray['mapy'] =
round($clonePoint->y,4);

                        }else {

                                    $map->queryByShape($queryShape);

                        }

 

Do you have any idea what I am doing wrong?

 

Thanks

 

Sean Ziniker
GIS Analyst
Jefferson County, Oregon
66 S.E. "D" Street, Suite B
Madras, OR 97741
541.325.5083 Office
541.325.5089 Fax

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20101006/09dca045/attachment.html


More information about the Geomoose-users mailing list