[postgis-users] WKT - Exponential Coordinates

Martin Davis mbdavis at VividSolutions.com
Mon May 1 14:18:30 PDT 2006


JTS 1.7 added support for scientific notation in WKTWriter.  My guess is
that this hasn't made its way into PostGIS.

Martin Davis, Senior Technical Architect
Vivid Solutions Inc.      www.vividsolutions.com
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Randy How
> Sent: May 1, 2006 12:55 PM
> To: 'PostGIS Users Discussion'
> Subject: [postgis-users] WKT - Exponential Coordinates
> 
> 
>  
> 
> 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
>  
> 
> 
> _______________________________________________
> postgis-users mailing list postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 



More information about the postgis-users mailing list