[mapserver-users] What is the error?

Steve Lime Steve.Lime at dnr.state.mn.us
Fri Oct 30 13:57:41 EDT 2009


Sounds to me like you're version of MapServer does not contain GEOS support. It's required
for getArea() and toWKT().

Steve

>>> On 10/29/2009 at 11:50 PM, in message
<4588.81195.qm at web33908.mail.mud.yahoo.com>, joel ml <mpg70221725 at yahoo.com.ar>
wrote:
> the code is java, version de mapserver 
> 5.2************************************************************************88
> 88import librerias.Xutil;import edu.umn.gis.mapscript.MS_SHAPE_TYPE;import 
> edu.umn.gis.mapscript.lineObj;import 
> edu.umn.gis.mapscript.mapscriptConstants;import 
> edu.umn.gis.mapscript.pointObj;import edu.umn.gis.mapscript.shapeObj;
> 
> public class PruebasShapes {
> 	/**	 * @param args	 */	public static void main(String[] args) {		shapeObj s=new 
> shapeObj(MS_SHAPE_TYPE.MS_SHAPE_POLYGON.swigValue());		lineObj l=new 
> lineObj();		l.add(new pointObj(2,2,0));		l.add(new 
> pointObj(2,6,0));		s.add(l);		lineObj lx=new lineObj();				lx.add(new 
> pointObj(2,6,0));		lx.add(new pointObj(6,6,0));		s.add(lx);		lineObj ly=new 
> lineObj();				ly.add(new pointObj(6,6,0));		ly.add(new 
> pointObj(6,2,0));		s.add(ly);		lineObj lz=new 
> lineObj();				lz.add(new pointObj(6,2,0));		lz.add(new 
> pointObj(2,2,0));		s.add(lz);		s.setBounds();		Xutil.printConsola("area 
> "+s.getArea()+" num lines:"+s.getNumlines()+" WKT: 
> "+s.toWKT());		Xutil.printConsola(""+s.getLength()+" 
> "+s.getBounds().toString());	}
> }
> ***************************************************************************t
> he output:
> area -1.0 num lines:4 WKT: null-1.0 { 'minx': 2 , 'miny': 2 , 'maxx': 6 , 
> 'maxy': 6 
> }***************************************************************************
> Why the output is -1 and WKT=null?, where is the error?
> 
> 
> 
>       Yahoo! Cocina
> 
> Encontra las mejores recetas con Yahoo! Cocina.
> 
> 
> http://ar.mujer.yahoo.com/cocina/



More information about the mapserver-users mailing list