[postgis-users] WKT - Exponential Coordinates

Randy How rhow at i3.com
Mon May 1 12:54:37 PDT 2006


 

I'm executing an intersection in PostGIS 1.1.0 using WKT input multipolygon
geometries.  The WKT result coordinates have exponential values (i.e.
28.110482 -1e-06,28.9210135294118 -1e-06,29.7315450588235 -1e-06).  One side
of the input multipolygons is the equator.

Here's the code -

private com.vividsolutions.jts.geom.Geometry _jtsProductCoverage = null;

string sqlIntersection = "select AsText(Intersection(GeometryFromText('" +
wktAOI + 	"',4326),geometry)) " +
	"from coverage " +
	"where product_id = " + this.Product_id + ";";

// Convert the Product Coverage to JTS geometry string wktProductCoverage =
(new DataAccess()).ExecuteScalar(sqlIntersection);

_jtsProductCoverage = JTSHelper.WKTGeometryToJTSGeometry(wktProductCoverage,
4326);


Presently the results are inputs to the JTS.WKTReader for succeeding
procedures, but the exponential values are throwing an exception in the
WKTReader.
 
Ideally I'd like to eliminate the WKTReader results conversion.  FYI - I'm
writing this in C#.  I'm wondering what the best option is to transfer the
geometries from PostGIS binary to JTS/GeoToolsNet geometries.
 
If anyone has any input/feedback/examples, I'd greatly appreciate it.

Thanks, Randy
 
Geospatial Applications Developer
 
Web: www.i3.com
 





More information about the postgis-users mailing list