Re: [postgis-users] Import gpx files into Postgis db (windows)?

2014-11-04 Thread James David Smith
Hi Nicolas, Thanks for pointing Dandrigo towards the GPX driver for GDAL - I didn't know it existed to be honest so saw your reply with interest. Would you mind, if possible, giving a sample line or two about how someone could create a new table in PostGIS from the GPX please? The examples in the

Re: [postgis-users] Import gpx files into Postgis db (windows)?

2014-11-04 Thread James David Smith
public | spatial_ref_sys | table | nicolas public | track_points| table | nicolas public | tracks | table | nicolas public | waypoints | table | nicolas (6 lignes) Nicolas On 4 November 2014 10:52, James David Smith james.david.sm...@gmail.com wrote: Hi Nicolas

Re: [postgis-users] Changing Column output from WKB to Lat Lon Coordinates

2014-07-14 Thread James David Smith
Google the function st_astext . Should do what you want. Alternatively you can use st_x and st_y. Cheers //JDS On 14 Jul 2014 22:02, e...@pwwinc.net wrote: Hello, I am attempting to store some gps coordinates that i collected for a geospatial db in precision ag. I created a table with a

Re: [postgis-users] Grouping by geom with count?

2014-04-28 Thread James David Smith
inter_line UNION ALL SELECT * FROM diff_line ) SELECT the_geom, count(*) FROM all_lines GROUP BY the_geom) Best wishes James On 25 April 2014 08:56, James David Smith james.david.sm...@gmail.com wrote: Thanks guys, I'll give that a crack later. //JDS On 25 Apr 2014 08:33, Rémi Cura remi.c

Re: [postgis-users] Grouping by geom with count?

2014-04-28 Thread James David Smith
James David Smith james.david.sm...@gmail.com: Hey all, I decided to push ahead with trying to make a table for this mini-project, rather than rely on QGIS styles. I can explain why if anyone is interested. However when I run the query that Hugues hepled with, I get the error: ERROR

Re: [postgis-users] Grouping by geom with count?

2014-04-28 Thread James David Smith
-04-28 11:40 GMT+02:00 James David Smith james.david.sm...@gmail.com: Hey Remi, I don't understand what you mean? Why do I need to translate my data? Thanks James On 28 April 2014 10:25, Rémi Cura remi.c...@gmail.com wrote: I'm obsessed with precision, so I would say translate your data

Re: [postgis-users] Grouping by geom with count?

2014-04-25 Thread James David Smith
). By the way, if all that you want is darker colours in QGIS, you could perhaps just play around with the opacity settings for the lines. Åsmund On Thu, Apr 24, 2014 at 5:22 PM, James David Smith james.david.sm...@gmail.com wrote: Thanks for the reply Hugues. Much appreciated. I've replaced

[postgis-users] Grouping by geom with count?

2014-04-24 Thread James David Smith
Hi all, A bit of advice please. I have a table of about 250,000 linestring. They represent peoples routes on roads around London. I would like to use them in QGIS now to show the most used roads by making them a darker colour. So to do this I feel I need to do some sort of grouping of the

Re: [postgis-users] Grouping by geom with count?

2014-04-24 Thread James David Smith
AS ( SELECT * FROM inter_line UNION ALL SELECT * FROM diff_line ) SELECT geom, count(*) FROM all_lines GROUP BY geom -Message d'origine- De : postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-boun...@lists.osgeo.org] De la part de James David Smith

[postgis-users] Why unrecognized field type?

2013-12-03 Thread James David Smith
Hi all, Apologies for cross-posting this to the RPostrgeSQL and PostGIS mailing lists, but I'm not sure where the problem lies. I am using the RPostgreSQL package of R to connect to my installation of PostgreSQL/PostGIS. I want to retrieve some coordinates from my database and run the below

Re: [postgis-users] Why unrecognized field type?

2013-12-03 Thread James David Smith
On 3 December 2013 15:55, Lee Hachadoorian lee.hachadooria...@gmail.comwrote: On Tue, Dec 3, 2013 at 5:23 AM, James David Smith james.david.sm...@gmail.com wrote: Hi all, Apologies for cross-posting this to the RPostrgeSQL and PostGIS mailing lists, but I'm not sure where the problem lies

Re: [postgis-users] Grid of points inside Polygon

2013-11-29 Thread James David Smith
,1000); Cheers, Rémi-C 2013/11/15 James David Smith james.david.sm...@gmail.com Hey Remi, I've actually managed to get the file 'ukmajorroads' already and have loaded it into my database. There are 395356 rows in the database. There is a field called 'geom' and I have built an index

Re: [postgis-users] Odd st_buffer behaviour

2013-11-26 Thread James David Smith
. Cheers, Rémi-C 2013/11/26 Mike Toews mwto...@gmail.com On 26 November 2013 06:04, James David Smith james.david.sm...@gmail.com wrote: 2) Now I buffer it: SELECT ST_Buffer( ST_GeomFromText( 'LINESTRING(555936.152 200920.58202,555938.31202

Re: [postgis-users] Odd st_buffer behaviour

2013-11-25 Thread James David Smith
Apologies. I think I've just answered this myself. It's the 'endcap=flat join=round' bit isn't it. It's not doing what I am expecting it to do. Though I'm not quite sure how to fix it yet. On 25 November 2013 17:04, James David Smith james.david.sm...@gmail.com wrote: Hi there, Some code

Re: [postgis-users] Odd st_buffer behaviour

2013-11-25 Thread James David Smith
PM, James David Smith wrote: Hi Remi/all, I realise I'm digressing slightly from the point, but this seems related. This seems strange to me: I check the geometry type of a table of what I think are linestrings (roads): ukroads=# SELECT COUNT(*), geometrytype(geom) FROM ukrds GROUP

Re: [postgis-users] Grid of points inside Polygon

2013-11-15 Thread James David Smith
)? If it is not too long, we will go on and cut the lines so that for every road, we keep the part of the lines that are inside the road_buffer. (I have to leave now, tomorrow) Cheers, Rémi-C 2013/11/13 James David Smith james.david.sm...@gmail.com Hey Remi, I don't quite get what the query you

Re: [postgis-users] Grid of points inside Polygon

2013-11-15 Thread James David Smith
Thanks both. Geometries now fixed. The query 'CREATE TABLE lines_for_each_road' has now been set running. Will report back when it's done. I suspect it may take a while! James On 15 November 2013 11:03, Sandro Santilli s...@keybit.net wrote: On Fri, Nov 15, 2013 at 11:50:42AM +0100, Rémi

Re: [postgis-users] Grid of points inside Polygon

2013-11-15 Thread James David Smith
many geoms do you have in ukmajrdbuffer? Cheers, Rémi-C 2013/11/15 Rémi Cura remi.c...@gmail.com Hey Sandro, Thanks for this, it is at least twice faster =) Cheers, Rémi-C 2013/11/15 James David Smith james.david.sm...@gmail.com Thanks both. Geometries now fixed. The query

Re: [postgis-users] Grid of points inside Polygon

2013-11-15 Thread James David Smith
ukmajrdbuffer ). Cheers, Rémi-C 2013/11/15 James David Smith james.david.sm...@gmail.com Hey. Yes, it's done. Was just getting some lunch! :-) select count(*) from lines_for_each_road Result = 187033 I have also just ran 'VACUUM ANALYZE' on the tables 'lines_for_each_road' as well

Re: [postgis-users] Grid of points inside Polygon

2013-11-15 Thread James David Smith
it run during the week end? Cheers, Rémi-C 2013/11/15 James David Smith james.david.sm...@gmail.com Hey Remi, Do you think before I try running the big query you have just sent me, that I should go back and try to get the original file of uk roads? I mean the very original file that has

Re: [postgis-users] Grid of points inside Polygon

2013-11-15 Thread James David Smith
...@gmail.com wrote: Still is a shame : with proper data we should have some result with about one hour i guess. Cheers, Rémi C 2013/11/15 James David Smith james.david.sm...@gmail.com Remi, Ok. Cool. I've set the below query running. On Monday I will also attempt to get the original road lines

Re: [postgis-users] Grid of points inside Polygon

2013-11-13 Thread James David Smith
a function on big data when you have not tested it fully (including scaling behavior) on small data. Cheers Rémi-C 2013/11/11 James David Smith james.david.sm...@gmail.com Hi all, Would appreciate some advice on the best way to accomplish this please. Our situation is that we have a single

Re: [postgis-users] Grid of points inside Polygon

2013-11-13 Thread James David Smith
, where the number of points is 500km * 50 line/km * 1000km * 50 line/km Hope it helps, Cheers, Rémi-C 2013/11/13 James David Smith james.david.sm...@gmail.com Hey Remi, Thanks for your reply. So in your mind you think we should have a database of say 300 polygons, and then we run

Re: [postgis-users] Grid of points inside Polygon

2013-11-13 Thread James David Smith
. If we do the N-S and E-W lines solution that you suggest, I don't think that this will work will it? Thanks James On 13 November 2013 11:49, James David Smith james.david.sm...@gmail.com wrote: Hi Remi, Thanks so much for this detailed response. Your idea about creating the lines

Re: [postgis-users] Grid of points inside Polygon

2013-11-13 Thread James David Smith
a primary key then if you use it) Of course I didn't test this query, but you should be able to use it easily. Cheers, Rémi-C 2013/11/13 James David Smith james.david.sm...@gmail.com Hi Remi, Apologies. One more thing which I am not sure about. We need the final grid of points

[postgis-users] Grid of points inside Polygon

2013-11-11 Thread James David Smith
Hi all, Would appreciate some advice on the best way to accomplish this please. Our situation is that we have a single polygon which has been created by buffering all of the major roads in the UK. Projection is OSGB36 (27700). Obviously it's quite a big polygon. -- SELECT st_area(geom) FROM

[postgis-users] Storing 4D Points Examples?

2013-10-04 Thread James David Smith
Dear all, Until today I hadn't appreciated that PostGIS now supports use of 4D geometry storage (x, y, time, z). I have a NetCDF file that stores data in a similar way, and would like to bring it into PostGIS instead for use with my other data. In order to do this I need to understand how to use

Re: [postgis-users] Problems installing on Linux

2013-08-12 Thread James David Smith
. I am not sure why you are having issues there... I don't know why I said to do -d because you are right, it's not a valid option. -Original Message- From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of James David Smith Sent

Re: [postgis-users] Problems installing on Linux

2013-08-12 Thread James David Smith
On 12 August 2013 12:50, Wilkins, Brian bwilk...@harris.com wrote: Glad to hear you got it working! What is legacy.sql? Did my other steps help? -Original Message- From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of James David Smith

Re: [postgis-users] Problems installing on Linux

2013-08-08 Thread James David Smith
On 6 August 2013 23:32, BladeOfLight16 bladeofligh...@gmail.com wrote: On Tue, Aug 6, 2013 at 12:53 PM, James David Smith james.david.sm...@gmail.com wrote: However it says that Topology and Raster support are not present. So I thought that I could now run the following commands to install

Re: [postgis-users] Problems installing on Linux

2013-08-08 Thread James David Smith
On 8 August 2013 09:43, James David Smith james.david.sm...@gmail.com wrote: On 6 August 2013 23:32, BladeOfLight16 bladeofligh...@gmail.com wrote: On Tue, Aug 6, 2013 at 12:53 PM, James David Smith james.david.sm...@gmail.com wrote: However it says that Topology and Raster support

Re: [postgis-users] Problems installing on Linux

2013-08-08 Thread James David Smith
On 8 August 2013 16:02, James David Smith james.david.sm...@gmail.com wrote: On 8 August 2013 15:57, Wilkins, Brian bwilk...@harris.com wrote: Do you have perl installed? It seems like it is unable to execute the perl script. -Original Message- From: postgis-users-boun

Re: [postgis-users] Problems installing on Linux

2013-08-08 Thread James David Smith
/tmp/dump name.dmp I always dump the globals just in case... Brian -Original Message- From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of James David Smith Sent: Thursday, August 08, 2013 12:23 PM To: PostGIS Users Discussion

Re: [postgis-users] Problems installing on Linux

2013-08-06 Thread James David Smith
On 6 August 2013 10:59, Mike Toews mwto...@gmail.com wrote: On 6 August 2013 21:50, Nicolas Ribot nicolas.ri...@gmail.com wrote: Hi, What is the *first* error message returned by the command: psql -d james_test -f /usr/pgsql-9.0/share/contrib/postgis-2.0/postgis.sql Nicolas A good way to

Re: [postgis-users] Problems installing on Linux

2013-08-06 Thread James David Smith
) server, and if not cleaning geos and postgis before building Cheers, Rémi-C 2013/8/6 Mike Toews mwto...@gmail.com On 6 August 2013 22:49, James David Smith james.david.sm...@gmail.com wrote: Hi Mike, Thanks for the reply. I thought that I had the latest version of GEOS, so I just

Re: [postgis-users] Problems installing on Linux

2013-08-06 Thread James David Smith
late, but when I did an upgrade, I had to run my dump through one of the postgis update scripts in the contrib directory. Did you do that? Brian -Original Message- From: postgis-users-boun...@lists.osgeo.org [mailto: postgis-users-boun...@lists.osgeo.org] On Behalf Of James David

[postgis-users] Problems installing on Linux

2013-08-05 Thread James David Smith
Hi there, I'm trying to make and compile PostGIS 2.0 with PostgreSQL 9.0. My verrsion of PostgreSQL is: PostgreSQL 9.0.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 64-bit A work colleague and I havee been following the steps here:

Re: [postgis-users] Comparing St_Distance() with Google API

2013-07-24 Thread James David Smith
- and they are neither equal to neigher your start- nor endpoint I would guess there are some rounding going on somewhere - that the google api just is not able to distinguish between points so close together. Morten James David Smith skrev: Hi there everyone, I've been messing about using the Google

[postgis-users] Upgrading PostGIS

2013-07-08 Thread James David Smith
Hi all, Could someone point me towards some instructions for upgrading my PostGIS version please? I interact with it using PSQL. My current versions are below: PostgreSQL 9.0.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48), 64-bit POSTGIS=1.5.5SVN

[postgis-users] Google Directions - PostGIS

2013-05-16 Thread James David Smith
Hi there, This isn't so much a question as such, more a request for opinions and advice. I was wondering whether anyone had any experience with using the Google API for getting driving directions/routing - but then storing the results in a PostgreSQL/PostGIS database. I was thinking that my

Re: [postgis-users] Google Directions - PostGIS

2013-05-16 Thread James David Smith
Haha. Whoops. Yes, here is the link: http://project-osrm.org/ API details here: https://github.com/DennisOSRM/Project-OSRM/wiki/Server-api Not quite as many options as the Google Directions API, but still pretty good. James On 16 May 2013 20:39, Brian Wilson br...@wildsong.biz wrote: I've

Re: [postgis-users] pgsql2shp using java ProcessBuilder

2013-04-05 Thread James David Smith
Sorry for the dumb suggestions, but have you tried putting '37995' instead of 37995 ? Also you are absolutely sure that you have columns called coordinates and date in your points table right? Note that they might be case sensitive too, so check that. On 4 April 2013 16:21, Lelo - Luiz Rogério De

Re: [postgis-users] How to test gdalinfo for my postgis 's gdal ?

2013-02-28 Thread James David Smith
Hi, I'm not sure if this is what you are looking for exactly, but if you do this in a query in a PostGIS database it might help: SELECT postgis_full_version() It will give you something like: POSTGIS=2.0.1 r9979 GEOS=3.3.5-CAPI-1.7.5 PROJ=Rel. 4.8.0, 6 March 2012* GDAL=GDAL 1.9.1, released

Re: [postgis-users] Google Polyline into PostGIS

2013-02-18 Thread James David Smith
, James David Smith james.david.sm...@gmail.com wrote: Dear all, I've had a quick search online and found a few people who have had similar questions, but no definite answers. My question is whether there is a simple way to take an encoded Google Polyline and place it into a Geometry column

Re: [postgis-users] Google Polyline into PostGIS

2013-02-18 Thread James David Smith
richard.greenw...@gmail.com wrote: On Fri, Feb 15, 2013 at 6:44 AM, James David Smith james.david.sm...@gmail.com wrote: Dear all, I've had a quick search online and found a few people who have had similar questions, but no definite answers. My question is whether there is a simple way

Re: [postgis-users] Using PostGIS for latitude longitude

2012-12-19 Thread James David Smith
Dear Neville, I would first start with making a proper 'geometry' column rather than using your Lat and Long columns. You would do this with code like this: SELECT AddGeometryColumn ('table_name','the_geom',27700,'POINT',2); Notes about this: 'the_geom' is an arbitrary column name. Call it