Re: [postgis-users] Validating geomatries against a coordinate system
Will have a look at it. Thanks for the help Rob Mario > > > In our project using PostGIS we need to import some shape files into > PostGIS. Some of these shape files have no corresponding .prj file and thus > we ask the user to specify the coordinate system for the shape file. > > > > If the user specifies a wrong coordinate system, projecting data will not > work correctly and PostGIS may throw errors. > > > > Is there an easy way to check whether the geometry coordinates are within a > "valid" extent for the coordinate system? > EPSG has an area-of-use defined for most SRIDs to give the *general* location of where they apply to. So you could project those "corners" into the projection itself and use the resulting coordinates as soft limits. However, you're still going to get plenty of errors or data appearing in the wrong place. Might be better than nothing though :) You can download the EPSG database from http://www.epsg.org/geodetic.html - grab the postgresql version and get stuck in. Rob :) ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Validating geomatries against a coordinate system
On Thu, Dec 16, 2010 at 9:32 PM, Mario T. de Sales wrote: > > > In our project using PostGIS we need to import some shape files into > PostGIS. Some of these shape files have no corresponding .prj file and thus > we ask the user to specify the coordinate system for the shape file. > > > > If the user specifies a wrong coordinate system, projecting data will not > work correctly and PostGIS may throw errors. > > > > Is there an easy way to check whether the geometry coordinates are within a > “valid” extent for the coordinate system? > EPSG has an area-of-use defined for most SRIDs to give the *general* location of where they apply to. So you could project those "corners" into the projection itself and use the resulting coordinates as soft limits. However, you're still going to get plenty of errors or data appearing in the wrong place. Might be better than nothing though :) You can download the EPSG database from http://www.epsg.org/geodetic.html - grab the postgresql version and get stuck in. Rob :) -- Koordinates Ltd. PO Box 1604, Shortland St, Auckland 1140, New Zealand Phone +64-9-966 0433 Fax +64-9-969 0045 Web http://koordinates.com/ ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] Validating geomatries against a coordinate system
Hi, In our project using PostGIS we need to import some shape files into PostGIS. Some of these shape files have no corresponding .prj file and thus we ask the user to specify the coordinate system for the shape file. If the user specifies a wrong coordinate system, projecting data will not work correctly and PostGIS may throw errors. Is there an easy way to check whether the geometry coordinates are within a "valid" extent for the coordinate system? Thanks for any help ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users