[mapserver-users] Getting centroid coords

2013-02-05 Thread Bistrais, Bob
This seemed like a simple one but I am having problems. I am trying to get the X and Y of a centroid, and display it to console. I keep getting errors instead. Here is the code: $centroid=ms_newPointObj(); $oShape=$searchLayer-getShape($oResult); //$oShape is a result from a

Re: [mapserver-users] Getting centroid coords

2013-02-05 Thread Thomasch
Bistrais, Bob wrote: $centroid = $oShape-getCentroid(); from http://mapserver.org/mapscript/php/index.html#shapeobj : pointObj getCentroid() Returns a point object representing the centroid of the shape. Only available if php/mapscript is built with GEOS library. Here you get an point

Re: [mapserver-users] Getting centroid coords

2013-02-05 Thread Bistrais, Bob
Got it- use the wrong syntax. Instead of: $centroid(x)... Should have used: $centroid-x ... From: Bistrais, Bob Sent: Tuesday, February 05, 2013 3:29 PM To: mapserver-users@lists.osgeo.org Subject: Getting centroid coords This seemed like a simple one but I am having problems. I am trying