Re: [postgis-users] ST_Buffer questions
To look up an appropriate projection, you have a number of options: Easy : http://www.spatialreference.org/ Sort of easy : SELECT srid, srtext FROM spatial_ref_sys WHERE srtext LIKE '%GDA94%'; -- To find something containing Geocentric Datum of Australia 1994 But Australia is a big country, so it depends where in Australia you are - and how accurate you want to be. In Western Australia you might get away with just using epsg:28350, but you could choose better for Macquarie Island 28356? If you are going globally you might want to just use normal UTM Zones (WGS84). The South ones all start with 327_ _... ie Western Australia would be 32750. The North ones start with 326_ _. Good luck - look at the website above. cheers Ben On 15/04/2010, at 14:15 , Chen, Li [Contractor] wrote: > Hi, > > Do you might know a proper "appropriate_projection_epsg"? I am in Australia > but I might need to use data from the whole world. > > Also, I was not able to find a SRID for ECEF reference system, does anyone > know? > > Thanks, > > Li > > -Original Message- > From: postgis-users-boun...@postgis.refractions.net > [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Ben Madin > Sent: Thursday, 1 April 2010 4:42 PM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] ST_Buffer questions > > G'day Li, > > I can't help with Q2, but > > On 01/04/2010, at 12:28 , Chen, Li [Contractor] wrote: > >> Q1. >> ST_Buffer(g1, range) is able to return a geometry within the range of g1. >> >> So, I define two point using lon/lat (SRID=4326) and range 10km. I want to >> see whether they cross each other by using ST_Crosses(g1, g2). >> However, I don't know the unit of the range parameter in ST_Buffer(g1,range) >> as it is not provide in the docs. So is it km or meters? > > The same unit as your Geometry - decimal degrees. Obviously due to the change > in the value of this unit at differing latitudes, this is not useful, so a > more sensible approach is either to transform your point into a projection > using metres, and then use metres > > (off the top of my head it would look like : > > select st_buffer(st_transform(g1, appropriate_projection_epsg),1); > > but you should check the docs) > > or use the geography type from postgis 1.5? but I haven't tried it yet? > > cheers > > Ben > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] ST_Buffer questions
Hi, Do you might know a proper "appropriate_projection_epsg"? I am in Australia but I might need to use data from the whole world. Also, I was not able to find a SRID for ECEF reference system, does anyone know? Thanks, Li -Original Message- From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Ben Madin Sent: Thursday, 1 April 2010 4:42 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] ST_Buffer questions G'day Li, I can't help with Q2, but On 01/04/2010, at 12:28 , Chen, Li [Contractor] wrote: > Q1. > ST_Buffer(g1, range) is able to return a geometry within the range of g1. > > So, I define two point using lon/lat (SRID=4326) and range 10km. I want to > see whether they cross each other by using ST_Crosses(g1, g2). > However, I don't know the unit of the range parameter in ST_Buffer(g1,range) > as it is not provide in the docs. So is it km or meters? The same unit as your Geometry - decimal degrees. Obviously due to the change in the value of this unit at differing latitudes, this is not useful, so a more sensible approach is either to transform your point into a projection using metres, and then use metres (off the top of my head it would look like : select st_buffer(st_transform(g1, appropriate_projection_epsg),1); but you should check the docs) or use the geography type from postgis 1.5? but I haven't tried it yet? cheers Ben ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] ST_Buffer questions
Thanks Ben, I will try what you suggested. We only need to represent mobile cell tower, so geography might be too much for the application. Especially consider there are much more functions for geometry than geography. Happy Easter:) -Original Message- From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Ben Madin Sent: Thursday, 1 April 2010 4:42 PM To: PostGIS Users Discussion Subject: Re: [postgis-users] ST_Buffer questions G'day Li, I can't help with Q2, but On 01/04/2010, at 12:28 , Chen, Li [Contractor] wrote: > Q1. > ST_Buffer(g1, range) is able to return a geometry within the range of g1. > > So, I define two point using lon/lat (SRID=4326) and range 10km. I want to > see whether they cross each other by using ST_Crosses(g1, g2). > However, I don't know the unit of the range parameter in ST_Buffer(g1,range) > as it is not provide in the docs. So is it km or meters? The same unit as your Geometry - decimal degrees. Obviously due to the change in the value of this unit at differing latitudes, this is not useful, so a more sensible approach is either to transform your point into a projection using metres, and then use metres (off the top of my head it would look like : select st_buffer(st_transform(g1, appropriate_projection_epsg),1); but you should check the docs) or use the geography type from postgis 1.5? but I haven't tried it yet? cheers Ben ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] ST_Buffer questions
G'day Li, I can't help with Q2, but On 01/04/2010, at 12:28 , Chen, Li [Contractor] wrote: > Q1. > ST_Buffer(g1, range) is able to return a geometry within the range of g1. > > So, I define two point using lon/lat (SRID=4326) and range 10km. I want to > see whether they cross each other by using ST_Crosses(g1, g2). > However, I don’t know the unit of the range parameter in ST_Buffer(g1,range) > as it is not provide in the docs. So is it km or meters? The same unit as your Geometry - decimal degrees. Obviously due to the change in the value of this unit at differing latitudes, this is not useful, so a more sensible approach is either to transform your point into a projection using metres, and then use metres (off the top of my head it would look like : select st_buffer(st_transform(g1, appropriate_projection_epsg),1); but you should check the docs) or use the geography type from postgis 1.5? but I haven't tried it yet? cheers Ben ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] ST_Buffer questions
Hi Everyone, I am a newbie to this community and I would like to ask a question/s :). Q1. ST_Buffer(g1, range) is able to return a geometry within the range of g1. So, I define two point using lon/lat (SRID=4326) and range 10km. I want to see whether they cross each other by using ST_Crosses(g1, g2). However, I don't know the unit of the range parameter in ST_Buffer(g1,range) as it is not provide in the docs. So is it km or meters? Q2. I want to define many circle sectors around the earth. And I have a column to set the location of the centre and another column to set the shape of the sector (direction, diameter). Is there a function to return a geometry that represents both the location and shape of the sector? ST_Buffer only returns a full circle. Thanks for the help, Li ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users