[postgis-users] Re: Why doesn't postgis do more with projections and SRID's? ( was: What is the tolerance parameter for simplify? )
strk at refractions.net
strk at refractions.net
Wed Jan 5 06:54:24 PST 2005
I suspect GEOS throwing exceptions based on precision is a bug.
We are discussing this on postgis-devel (JTS-1.4 have the same problem).
--strk;
On Wed, Jan 05, 2005 at 07:48:04AM -0700, Ethan Alpert wrote:
> I'm leaving town for a couple days but I will look into the area_spheroid. As for simplify if you're using lat/lon coordinates simplify(the_geom,.1) will give your dramatically different results depending on whether you're near the equator or near the pole.
>
> Anyhow I was trying to use simplify (because it's all I could find) to clean up geometries I've built using geomunion that have points too close together and cause GEOS to throw topology errors. If I project each of my polygons onto an appropriate projected coordinate system then run simplify with meters units it works great and allows me to "clean" my geometries.
>
> -e
>
> ________________________________
>
> From: strk at refractions.net [mailto:strk at refractions.net]
> Sent: Tue 1/4/2005 12:13 PM
> To: Ethan Alpert
> Cc: postgis-users at postgis.refractions.net
> Subject: Re: Why doesn't postgis do more with projections and SRID's? ( was: What is the tolerance parameter for simplify? )
>
>
>
> On Tue, Jan 04, 2005 at 07:06:56AM -0700, Ethan Alpert wrote:
> > Having simplify use the units of the projection probably was easier to implement but what does it really mean to use a 1/10 of a degree of tolerance? Why doesn't postgis allow the use of more reasonable values say meters? Why don't more functions work more like distance_spheroid (where you provide a spheroid to use for computation)? I ran into the same problem with area. What possible use is there knowing the degrees^2 of a polygon? It would seem that with the SRID and the proper spheroid more intuitive values could be used for functions like area and simplify and area. To compute areas for my data I know have to read my data out of the database, reproject it and compute my values. It would be much more convenient and less error prone if the database could do this for me.
> >
> > So what are the reasons for not providing this type of functionality in the database?
> >
> > -e
>
> Simplify is an output size reduction function. It uses Douglas-Peuker
> line simplification algorithm, which is known to give the most 'visually'
> correct output. Simplifying based on a different projection then
> the final (visual output) one does not make much sense.
>
> On the other hand, I see an area_spheroid() would be useful.
> If you want to give it a try you're the welcome and I'm happy
> to give you any support you'll need.
>
> --strk;
>
> >
> > ________________________________
> >
> > From: strk at refractions.net [mailto:strk at refractions.net]
> > Sent: Tue 1/4/2005 1:23 AM
> > To: Ethan Alpert
> > Cc: postgis-users at postgis.refractions.net
> > Subject: Re: [postgis-users] What is the tolerance parameter for simplify?
> >
> >
> >
> > On Mon, Jan 03, 2005 at 05:41:02PM -0700, Ethan Alpert wrote:
> > > Just curious what the units are. I have geometries in SRID 4326 (lat/lon
> > > wgs84) so what units would the tolerance parameter be in when calling
> > > simplify?
> > >
> > > Thanks,
> > >
> > > -e
> >
> > It would be the units of the projection.
> > Decimal degrees in your case.
> >
> > --strk;
> >
> > For standing up against patentability of software,
> >
> > Thank You, Poland!
> >
> > Read the intervention: http://kwiki.ffii.org/ConsPolon041221En
> > Send your thanks: thankyoupoland.info
> > Read/do more: http://www.noepatents.org/
> >
> >
>
> --
>
> For standing up against patentability of software,
>
> Thank You, Poland!
>
> Read the intervention: http://kwiki.ffii.org/ConsPolon041221En
> Send your thanks: thankyoupoland.info
> Read/do more: http://www.noepatents.org/
>
>
--
For standing up against patentability of software,
Thank You, Poland!
Read the intervention: http://kwiki.ffii.org/ConsPolon041221En
Send your thanks: thankyoupoland.info
Read/do more: http://www.noepatents.org/
More information about the postgis-users
mailing list