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

2014-11-04 Thread James David Smith
| Propriétaire > +-+---+-- > public | route_points| table | nicolas > public | routes | table | nicolas > public | spatial_ref_sys | table | nicolas > public | track_points| table | nicolas > public | tracks | table | nic

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] 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, 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 geometry colum

Re: [postgis-users] mulitpolygon with type set to geometry(Geometry, 4326)

2014-05-09 Thread James David Smith
For info, I think you could also have wrapped like this: St_setsrid(*st_centroid**(**report_geom**), 4326) as **pt_**geom* On 8 May 2014 23:37, "Jason Mathis" wrote: > > ah yes that works. Turns out you have to drop and create the view if I tried a replace i get the below message. > > ERROR:

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

2014-04-28 Thread James David Smith
. > After computing just translate it back. > > Cheers, > Rémi-C > > > 2014-04-28 11:40 GMT+02:00 James David Smith : > >> Hey Remi, >> >> I don't understand what you mean? Why do I need to translate my data? >> >> Thanks >> >> James

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

2014-04-28 Thread James David Smith
the_geom)d >> GROUP BY a.ssid >> ), >> all_lines AS ( >> SELECT * >> FROM inter_line >> UNION ALL >> SELECT * FROM diff_line >> ) >> SELECT the_geom, >> count(*) >> FROM all_lines >> GROUP BY the_geom) >> >> Be

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 wrote: > Thanks guys, I'll give that a crack later. > > //JDS > > On 25 Apr 2014 08:33, "Rémi Cura&

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

2014-04-25 Thread James David Smith
ging "a.the_geom != b.the_geom" to "not st_equals(a.the_geom, >> b.the_geom)". 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 >> >> >&g

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

2014-04-24 Thread James David Smith
No problem. I'm not quite sure how to work that into the query though please? On 24 April 2014 16:27, Hugues François wrote: > Excuse me for the mistake. Let's try st_equals. > > Hug > > James David Smith a écrit : > > Thanks for the reply Hugues. Much appreciat

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

2014-04-24 Thread James David Smith
m > > > > > -Message d'origine- > De : postgis-users-boun...@lists.osgeo.org > [mailto:postgis-users-boun...@lists.osgeo.org] De la part de James David Smith > Envoyé : jeudi 24 avril 2014 11:11 > À : PostGIS Users Discussion > Objet : [postgis-users] Groupi

[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 geometri

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

2013-12-03 Thread James David Smith
On 3 December 2013 15:55, Lee Hachadoorian wrote: > 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

[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 comma

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

2013-11-29 Thread James David Smith
y ; > UPDATE ukmajrdbuffer SET the_geom = ST_Buffer(geom,1000); > > > Cheers, > > Rémi-C > > > > 2013/11/15 James David Smith >> >> Hey Remi, >> >> I've actually managed to get the file 'ukmajorroads' already and have >>

Re: [postgis-users] Odd st_buffer behaviour

2013-11-26 Thread James David Smith
. > > Cheers, > > Rémi-C > > > 2013/11/26 Mike Toews >> >> On 26 November 2013 06:04, James David Smith >> wrote: >> > 2) Now I buffer it: >> > >> > SELECT ST_Buffer( >> > ST_GeomFromText( >> >

Re: [postgis-users] Odd st_buffer behaviour

2013-11-25 Thread James David Smith
>>> >>>> >>>> Does offset curve gives the same result? >>>> (seems lile offsetting both side have same behavior) >>>> >>>> Maybe you can try several buffers with increasing size? >>>> (default appears wau before 1000) >

Re: [postgis-users] Odd st_buffer behaviour

2013-11-25 Thread James David Smith
to simplify your line : each coordinates uses 15 digits, >> surely you don't need all of this ! >> (simplifying to 8 digits doesn't help). >> >> It seems like a bad design in algorithm ? >> >> Cheers, >> Rémi-C >> >> >

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 wrote: > Hi there,

Re: [postgis-users] Postgis overlapping two linestrings

2013-11-22 Thread James David Smith
Hi Ani, Have you looked into st_intersects() ? and st_intersection() ? http://postgis.refractions.net/docs/ST_Intersects.html James On 22 November 2013 16:17, Ani Alamo wrote: > Hi! > I need a specific function to get if two linestring overlaps. e.g. > Linestring 1 is Point (0, 0) : Point (10,

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

2013-11-15 Thread James David Smith
ts ; On 15 November 2013 15:42, Rémi Cura 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 > >> Remi, >> >> Ok. Cool. I've set the

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

2013-11-15 Thread James David Smith
r road. > Yet, why not let it run during the week end? > > Cheers, > > Rémi-C > > > 2013/11/15 James David Smith >> >> Hey Remi, >> >> Do you think before I try running the big query you have just sent me, >> that I should go back and try t

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

2013-11-15 Thread James David Smith
ion of EW lines with SN lines , that is > the points on the grid. > SELECT ST_Intersection(clSN.lines_cutted, clEW.lines_cutted) AS point > FROM cutted_lines_SN as clSN, cutted_lines_EW AS clEW > WHERE ST_Intersects(clSN.lines_cutted, clEW.lines_cutted)=TRUE --no point ot > compute an intersect

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

2013-11-15 Thread James David Smith
have ? (select count(*) from ukmajrdbuffer > ). > > Cheers, > Rémi-C > > > 2013/11/15 James David Smith >> >> Hey. >> >> Yes, it's done. Was just getting some lunch! :-) >> >> select count(*) from lines_for_each_road >> Result = 187033 >&g

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

2013-11-15 Thread James David Smith
check you have geom indexes on : >> "ukmajrdbuffer.geom" and "all_lines.the_geom" >> >> >> How many geoms do you have in "ukmajrdbuffer"? >> >> Cheers, >> Rémi-C >> >> >> 2013/11/15 Rémi Cura >>> >>

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 wrote: > On Fri, Nov 15, 2013 at 11:50:42AM +0100, Rémi Cura wrote: >> Y

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

2013-11-15 Thread James David Smith
road, all the > lines intersecting the road > example : > road_1 | line_2_EW > road_1 | line_3_EW > road_1 | line_78_SN > road_1 | line_7_EW > road_2 ... > > How long is it (don't uncomment plz), and how many rows do you get (select > count(*) from lines_for_each_r

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

2013-11-13 Thread James David Smith
ax > WHERE ST_Interesects(lineEW,bbox_of_england)= TRUE > > ) > SELECT row_number() over() AS uid, line, direction > FROM unioned_line > > then creating table and index on geom and on direction (and possibly on uid, > but better create a primary key then if you use it) > &

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

2013-11-13 Thread James David Smith
of mutliple 20. 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 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
25k + 50k lines), > and build index on it (index on geom and on the column saying if it is SN or > EW). > > The trick is the number of lines is around 500km * 50 line/km + 1000km * 50 > line/km , where the number of points is 500km * 50 line/km * 1000km * 50 > line/km > > Ho

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

2013-11-13 Thread James David Smith
s always a bad idea to run 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 >> >> Hi all, >> >> Would appreciate some advice on the best w

[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 ro

Re: [postgis-users] Move road lines to pavement lines?

2013-10-30 Thread James David Smith
rve ? The documentation says: " For > positive distance the offset will be at the left side of the input line and > retain the same direction." > > Hug > > James David Smith a écrit : > > Hi there, > > Just looking for some general thoughts and guidance on the b

[postgis-users] Move road lines to pavement lines?

2013-10-25 Thread James David Smith
Hi there, Just looking for some general thoughts and guidance on the best way to do this please. What I have is about 50,000 linestrings of varying length. They are in a projected coordinate system (OSGB36). They represent people walking around a city. The routing however has been done as road cen

Re: [postgis-users] Ubuntu installation guide - review?

2013-10-24 Thread James David Smith
That's really great Matthew. Well done. On 23 October 2013 21:12, Matthew Baker wrote: > Hi all, > > I've been refining a (fairly) simple installation guide for Ubuntu which > pulls from from the Postgresql apt repository. I wonder if anyone might have > a look at it and let me know if its ok. >

[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] Bezier or Spline smoothing implementation

2013-09-18 Thread James David Smith
I'm sure that it's because I don't quite understand what you are trying to do, but why not just use the native PostGIS function - http://postgis.net/docs/manual-2.0/ST_Line_Interpolate_Point.html ? On 18 September 2013 15:06, wrote: > Hey! > > First of all I can recommend two tutorials about ho

Re: [postgis-users] Problems installing on Linux

2013-08-12 Thread James David Smith
w. James On 12 August 2013 12:50, Wilkins, Brian 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 Ja

Re: [postgis-users] Problems installing on Linux

2013-08-12 Thread James David Smith
dures are sound. 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

Re: [postgis-users] Problems installing on Linux

2013-08-08 Thread James David Smith
g_dump -d -Fc > /tmp/.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, Augu

Re: [postgis-users] Problems installing on Linux

2013-08-08 Thread James David Smith
is-users-boun...@lists.osgeo.org] On Behalf Of James David Smith > Sent: Thursday, August 08, 2013 11:31 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] Problems installing on Linux > > On 8 August 2013 16:13, Wilkins, Brian wrote: >> See here: >> http://stack

Re: [postgis-users] Problems installing on Linux

2013-08-08 Thread James David Smith
ailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of James David Smith > Sent: Thursday, August 08, 2013 11:04 AM > To: PostGIS Users Discussion > Subject: Re: [postgis-users] Problems installing on Linux > > On 8 August 2013 16:02, James David Smith wrote: >> On 8 Augu

Re: [postgis-users] Problems installing on Linux

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

Re: [postgis-users] Problems installing on Linux

2013-08-08 Thread James David Smith
On 8 August 2013 15:57, Wilkins, Brian wrote: > Do you have perl installed? It seems like it is unable to execute the perl > script. > > > -Original Message- > From: postgis-users-boun...@lists.osgeo.org > [mailto:postgis-users-boun...@lists.osgeo.org] On Behalf

Re: [postgis-users] Problems installing on Linux

2013-08-08 Thread James David Smith
On 8 August 2013 09:43, James David Smith wrote: > On 6 August 2013 23:32, BladeOfLight16 wrote: >> On Tue, Aug 6, 2013 at 12:53 PM, James David Smith >> wrote: >>> >>> However it says that Topology and Raster support are not present. So I >>> thought t

Re: [postgis-users] Problems installing on Linux

2013-08-08 Thread James David Smith
On 6 August 2013 23:32, BladeOfLight16 wrote: > On Tue, Aug 6, 2013 at 12:53 PM, James David Smith > 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 those >> too: &

Re: [postgis-users] Problems installing on Linux

2013-08-06 Thread James David Smith
little 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...@

Re: [postgis-users] Problems installing on Linux

2013-08-06 Thread James David Smith
al) server, and if not cleaning geos and > postgis before building > > Cheers, > > Rémi-C > > > 2013/8/6 Mike Toews >> >> On 6 August 2013 22:49, James David Smith >> wrote: >> > >> > Hi Mike, >> > >> > Thanks for the reply

Re: [postgis-users] Problems installing on Linux

2013-08-06 Thread James David Smith
On 6 August 2013 11:14, Mike Toews wrote: > On 6 August 2013 22:02, James David Smith wrote: >> Thanks both. The first error is: >> >> psql:/usr/pgsql-9.0/share/contrib/postgis-2.0/postgis.sql:49: ERROR: >> could not load library "/usr/pgsql-9.0/lib/postgis-2.0.so

Re: [postgis-users] Problems installing on Linux

2013-08-06 Thread James David Smith
On 6 August 2013 10:59, Mike Toews wrote: > On 6 August 2013 21:50, Nicolas Ribot 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 do this is to stop psql on

[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: http://postgis.n

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

2013-07-24 Thread James David Smith
ual 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, >

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

2013-07-24 Thread James David Smith
Hi there everyone, I've been messing about using the Google Directions API thing recently, and came across some odd results. Code to demonstrate is below. Essentially the distance between two points using PostGIS is 18 metres, yet when I translate the points to Lat/Long and then stick them in the

[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" GE

Re: [postgis-users] Google Directions -> PostGIS

2013-06-11 Thread James David Smith
geometry > EXECUTE 'SELECT '|| wkt_linestring INTO result; > > --Insert the result as well as the start and finish locations and travel > mode used to generate the geometry into the database table > EXECUTE 'INSERT INTO route_geom VALUES(NEXTVAL('|| > quote_literal(seque

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 wrote: > > I've therefore had a

Re: [postgis-users] Google Directions -> PostGIS

2013-05-16 Thread James David Smith
e of the Content outside of the Service; and (ii) any content identifier > or key that the Maps APIs Documentation specifically permits you to store. > For example, you must not use the Content to create an independent database > of "places" or other local listings informati

[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 workfl

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, relea

Re: [postgis-users] Google Polyline into PostGIS

2013-02-18 Thread James David Smith
; On Sat, Feb 16, 2013 at 2:16 PM, Richard Greenwood > wrote: >> >> >> >> On Fri, Feb 15, 2013 at 6:44 AM, James David Smith >> wrote: >>> >>> Dear all, >>> >>> I've had a quick search online and found a few people who have

Re: [postgis-users] Google Polyline into PostGIS

2013-02-18 Thread James David Smith
Dear Richard, Info about Google Polyline's here: https://developers.google.com/maps/documentation/utilities/polylinealgorithm Thanks for tips - will check them out. Cheers James On 16 February 2013 14:16, Richard Greenwood wrote: > > > On Fri, Feb 15, 2013 at 6:44 AM, Jam

[postgis-users] Google Polyline into PostGIS

2013-02-15 Thread James David Smith
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 of type Polyline within PostGIS (that PostGIS understands and

Re: [postgis-users] Viewing the PostGIS in Action examples in QGIS

2013-02-13 Thread James David Smith
Hi Charles, As Atle says, you won't be able to view that point or the polygon in QGIS or anything like that. The query that you have ran is creating the point as an example. It creates it out of thin air for want of a better example. It isn't stored anywhere for you to be able to access from other

Re: [postgis-users] access is denied in Windows 7

2013-01-21 Thread James David Smith
I'm not sure if this is the same issue, but I often have similar problems when I am importing data. Have you tried to dump to the 'Data' folder within the PostgreSQL installation folder? I think you may find that works ok. I think it's permissions for writing to the folder that you are getting, rat

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 what