Andrea Aime <aaime <at> opengeo.org> writes:

> 
> Imran Rajjad ha scritto:
> > Hi,
> > 
> > I did the spatial indexing, still not working, the error is :
> > 
> > 
> > 
> > 13 May 09:42:27 ERROR [geotools.rendering] - / by zero
> > java.lang.ArithmeticException: / by zero
> >         at org.geotools.data.oracle.sdo.SDO.coordinates(SDO.java:2071)
> >         at org.geotools.data.oracle.sdo.SDO.create(SDO.java:2285)
> 
> The line numbers in that class have changed a bit in the meantime, but
> it seems you have invalid geometries in there, ones that declare
> a 0 dimension (e.g., no ordinates).
> 
> It's the first time in years anyone reported such a situation.
> What software did generate the Oracle table?
> 
> Oracle has utility functions to locate and fix invalid geometries,
> though for dimension-less ones I guess you want to simply locate
> and remove
> 
> Cheers
> Andrea
> 


I worked out what this was. The old shp2sdo.exe writes out SDO_GTYPE with single
digit values (eg 3 for polygon, 7 for multipolygon), rather than the newer dl0n
format. Oracle says you can still use these single digit values (for backwards
compatibility) but geotools does not handle it. It comes up with a zero value
for d, and throws this exception down the track.

Not sure if geotools should be fixed for this, since it's a deprecated value. I
just fixed my data instead. A quick sed over the .dat file that shp2sdo
generated fixed it up.

Regards, Paul



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to