Re: [postgis-users] Unprojected lat/long to 3081?

2011-02-03 Thread Francis Markham
EPSG 3081 is a metre projection, so you need to transform your points from lat long into the appropriate projection. Try something like this: *UPDATE event_table* *SET the_geom = ST_Transform(ST_SetSRID(ST_Point(event_location[1], event_location[0]), 4326), 3081) * This assumes your input latlo

Re: [postgis-users] suitable projection in metric system ?

2010-11-04 Thread Francis Markham
ic coordinates (lat/lon) you may wish to investigate the Geography type as Emily suggested. Be aware, however, that this has some cost in terms of speed for some operations, and not all operations defined in PostGIS for Geometry are currently available for Geography types. Good luck, Francis Mar

Re: [postgis-users] pgsql2shp dbf file encoding

2010-10-25 Thread Francis Markham
0x57h is the dreaded Windows-1252 codepage. I believe new versions of shapelib allow this to be set when the shapefile is created. Cheers, Francis Markham On 25 October 2010 20:05, Mark Cave-Ayland wrote: > > Denis Rykov wrote: > >> Try to export postgis data to shapefiles

Re: [postgis-users] how to write the sql if i want to find a geometry's d-distance neighbors?

2010-09-12 Thread Francis Markham
Hi Sunpeng, Definitely use ST_DWithin. -Francis On 13 September 2010 06:51, sunpeng wrote: > Hi, > I've the following table,and has created the index on uid and location; > CREATE TABLE points > ( > location geometry, //assume it's a 2-dimension point > uid integer > ) > > Now, I've a poi

Re: [postgis-users] making polygons from center + vertex

2010-08-11 Thread Francis Markham
Sure is, check out the ST_Buffer function http://postgis.refractions.net/docs/ST_Buffer.html ST_Buffer(geometry g1, float radius_of_buffer); If you give it a point as g1, and the radius of the circle it will calculate a pseduo-circular polygon for you. If you have two points g1 and g2 you coul

[postgis-users] ST_Azimuth on the spheroid

2010-08-04 Thread Francis Markham
x27;s Inverse formula (which also calculates azimuth). Cheers, Francis Markham ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users

[postgis-users] ST_Distance_Spheroid SRID

2010-08-02 Thread Francis Markham
Hi all, The documentation for ST_Distance_Spheroid ( http://postgis.refractions.net/docs/ST_Distance_Spheroid.html ) states that it "does not look at the SRID of a geometry and will always assume its in WGS 80 long lat." What is WGS 80? Is it WGS-84, GRS-80, or something else entirely? Cheers,

Re: [postgis-users] Get the bounding box?

2010-07-20 Thread Francis Markham
You might want to look into the GEOGRAPHY type http://postgis.refractions.net/docs/ch04.html#PostGIS_Geography to do this nicely. -Francis On 21 July 2010 12:57, Michael A. Peters wrote: > Thank you. It did work with one caveat, I assume because all my shape data > is in WGS84 it added an equal

Re: [postgis-users] Dot Density idea

2010-06-14 Thread Francis Markham
Looks great Martin. Another way of generating non-clumpy random dots without a grid-like pattern is to use a "repulsive" function. See for example, http://www.statisticsblog.com/2010/06/repulsive-dots-pattern-the-difference-of-distance/ Cheers, Francis On 7 May 2010 08:11, Martin Davis wrot

Re: [postgis-users] Using grids transformation method with PostGis

2010-06-08 Thread Francis Markham
I would also be interested in the answer to this question. Currently I export PostGIS data to shapefiles and use ogr2ogr to transform, if a grid shift is required. Perhaps the solution to this problem could be documented on the ST_Transform() page in the PostGIS manual? Cheers, Francis 2010/6/

[postgis-users] ArcGIS 9.3

2010-05-25 Thread Francis Markham
Hi all, What is considered best practice for connecting to PostGIS 1.5 from ArcGIS 9.3? I am aware of the built-in "Quick Import" tool - are there any other tools that you use or would recommend? Cheers, Francis ___ postgis-users mailing list postgis-

Re: [postgis-users] Check identical point

2010-05-21 Thread Francis Markham
Try: ST_DWithin(point1, point2, 0.1) -F 2010/5/22 eehab hamzeh > Hello > > I want to check if two points are identical, the points has x,y,z > coordinates and they are not exactly the same, i need to check the > intersection between them with tolerance value. any direction of how to do

Re: [postgis-users] line_interpolate_point does not return a point that intersects the line

2010-05-03 Thread Francis Markham
D'oh. Totally forgot about DWithin! Problem, solved. Thanks very much! -Francis On 3 May 2010 18:24, strk wrote: > On Mon, May 03, 2010 at 06:15:14PM +1000, Francis Markham wrote: > > Mmm, so it is a floating point issue - the distance is > 9.57711783686133e-12 > > m

Re: [postgis-users] Converting UTM to lat/lon using Postgis

2010-05-03 Thread Francis Markham
> > Any idea how I can fix this? > > > > > > --- > > *Mehmet ERKEK*** > > www.REIDIN.com <http://www.reidin.com/> > > > > *From:* postgis-users-boun...@postgis.refractions.net [mailto: &g

Re: [postgis-users] line_interpolate_point does not return a point that intersects the line

2010-05-03 Thread Francis Markham
Mmm, so it is a floating point issue - the distance is 9.57711783686133e-12 meters. Is there anyway to specify a tolerance for ST_Intersects and similar predicates? -Francis On 3 May 2010 17:53, strk wrote: > On Mon, May 03, 2010 at 04:41:09PM +1000, Francis Markham wrote: > &g

Re: [postgis-users] Converting UTM to lat/lon using Postgis

2010-05-03 Thread Francis Markham
Hi Mehmet, When you imported the shapefile, the SRID you are meant to specify is the SRID of the data, not the SRID you want. Since the data is in Dubai Local TM, the SRID is 3997. To get the transformation you want, try the following: select ST_AsText( ST_Transform(centroid(ST_SetSRID(the_ge

[postgis-users] line_interpolate_point does not return a point that intersects the line

2010-05-02 Thread Francis Markham
rsion POSTGIS="1.4.1" GEOS="3.2.1-CAPI-1.6.1" PROJ="Rel. 4.7.1, 23 September 2009" USE_STATS (1 row) Any assistance would be much appreciated. Thanks, -Francis Markham ___ postgis-users mailing list postgis