Re: [postgis-users] Error reading OID from Table. OID Column has null value

2012-10-31 Thread Nicolas Ribot
By the way, as the error occured when reading the table, did you check your table have a primary key ? (mine had integer one) Nicolas On 31 October 2012 17:17, Nicolas Ribot wrote: > Hi Mark, > > Just quickly tested ArcGIS 10.1 with Postgis and query layers: > > The table for

Re: [postgis-users] Error reading OID from Table. OID Column has null value

2012-10-31 Thread Nicolas Ribot
Hi Mark, Just quickly tested ArcGIS 10.1 with Postgis and query layers: The table for the test comes from a shapefile, loaded into postgis (WGS84). I can define a query layer from it and display it in ArcGIS (ArcMap ArcInfo). The error you mentioned rise when trying to export this layer to a Fil

Re: [postgis-users] Problem with 3D polygon intersection test

2012-10-30 Thread Nicolas Ribot
t; Ah drat! Ok then I have to basically do edge intersection tests by >> myself. >> Ah well. bad news! :( >> >> >> On Tue, Oct 30, 2012 at 10:44 AM, Nicolas Ribot >> wrote: >> >>> Hi, >>> >>> st_intersection is only suitable for 2D

Re: [postgis-users] Problem with 3D polygon intersection test

2012-10-30 Thread Nicolas Ribot
Hi, st_intersection is only suitable for 2D operations. Third dimension is not taken into account. Nicolas On 30 October 2012 09:44, Ed Linde wrote: > Hi All, > Is there a simpler test I can do? I am quite sure that I am probably not > using the right > function in my SQL, or not doing the int

Re: [postgis-users] Difficult Problem with Polygons

2012-10-29 Thread Nicolas Ribot
; Ed > > > > > On Mon, Oct 29, 2012 at 4:26 PM, Ed Linde wrote: >> >> Ok thanks, will look into that function. Because I wonder if the s/w I am >> using is >> actually outputting the vertices of each face in a cyclical fashion or >> just >> arbit

Re: [postgis-users] Difficult Problem with Polygons

2012-10-29 Thread Nicolas Ribot
, Ed Linde wrote: > Thanks Nicolas! Will look at the script that generated the polygon text.. > must have goofed something up there. > > > On Mon, Oct 29, 2012 at 4:05 PM, Nicolas Ribot > wrote: >> >> Hi, >> >> No. this is because some of your polygons

Re: [postgis-users] Difficult Problem with Polygons

2012-10-29 Thread Nicolas Ribot
on of two polygonal shapes in 3D > would be fairly > simple in postgis 2.0 :( > > Ed > > > On Mon, Oct 29, 2012 at 4:00 PM, Nicolas Ribot > wrote: >> >> If the points are computed in the right order, you can store them and >> pass them to st_makeLine and st_m

Re: [postgis-users] Difficult Problem with Polygons

2012-10-29 Thread Nicolas Ribot
gt;> On 10/29/2012 6:57 AM, Ed Linde wrote: >>> >>> Attached is a figure. Where the dotted line is the boundary of the >>> voronoi cell whose >>> generator is point P1. So triangle "4" intersects with the voronoi >>> boundary, but we are >

Re: [postgis-users] Difficult Problem with Polygons

2012-10-29 Thread Nicolas Ribot
triangle "4" intersects with the voronoi >> boundary, but we are >> interested in the adjacent triangles of triangle 4, which are closer to >> point P1. >> For example, triangle 5. >> >> Hope this helps. >> Cheers, >> Ed >> >> >>

Re: [postgis-users] Difficult Problem with Polygons

2012-10-29 Thread Nicolas Ribot
Could you draw a figure ? Nicolas On 29 October 2012 11:03, Ed Linde wrote: > Hi All, > Thanks for the suggestions. > For 1) I will look into how ST_touches works and see if it can pick up all > the adjacent polygons to > the one I have. And also look into Mike's suggestion on ST_relate...though

Re: [postgis-users] Installing PostGIS as an add-on in PostgreSQL 9.2.1 on a Mac

2012-10-23 Thread Nicolas Ribot
Hi, Kyngchaos packages provide postgis: http://www.kyngchaos.com/software/postgres You can also install it through macPorts: http://www.macports.org/ Or you can compile it manually, which is not very difficult. Nicolas On 23 October 2012 11:48, Lena Carlson wrote: > Hello, > > I am desperately

Re: [postgis-users] Visualize POLYGONs

2012-10-19 Thread Nicolas Ribot
ey are just plain old floats. Don't think Google Earth will be > able to show > them and I don't want to make some weird transformations on the coordinates > to > make it work on google. Are there no other 3D tools? > > Cheers, > Manu > > On Fri, Oct 19, 20

Re: [postgis-users] Visualize POLYGONs

2012-10-19 Thread Nicolas Ribot
> Hi All, > I have some polygons in a table that I need to see visually to see if they > intersect at some points and to double check my > calculations. Wondering if there is a good tool that can show me these > polygons? They are not associated with any > geographic lat long coordinates and hence

Re: [postgis-users] why doesn't linemerge() work?

2012-10-19 Thread Nicolas Ribot
Hi Andrew, This (long) thread may give you some hints on how to order and then merge lines together: "Closing polylines", 11 May 2012. Nicolas On 19 October 2012 00:27, Andrew Ukrainec wrote: > I've been trying to append a new LINESTRING to an existing > LINESTRING in a table, and this seems to

Re: [postgis-users] Geographies, geometries, international date line

2012-10-11 Thread Nicolas Ribot
Hi Maxime, Yes indeed, the new geography type take advantage of a very fast Gist index,often leading to queries faster than their geometry equivalent (see Paul Ramsey's blog about this new type). St_distance might also benefit from this new code. Concerning polygons crossind dateline, yes you wil

Re: [postgis-users] install template postgis 2

2012-10-08 Thread Nicolas Ribot
Hi, Did you run ldconfig after the postgis/proj4 installation, or add the path containing the lib in the ldd path ? Nicolas On 8 October 2012 17:12, Icadedt wrote: > Hi, > > postgresql 9.2 and postgis 2 are successfully installed in my linux centos > 6.3. > I would like to install postgis 2 tem

Re: [postgis-users] Loading triangles

2012-10-08 Thread Nicolas Ribot
roach. Nicolas On 8 October 2012 16:39, Ed Linde wrote: > Thanks Nicolas, what about something like > > ST_GeomFromText('POLYGON((0 0 -1,2 0 -2,1 2 -1 ,0 0 -2))') > > would that work? > > > On Mon, Oct 8, 2012 at 4:34 PM, Nicolas Ribot > wrote: >> &g

Re: [postgis-users] Loading triangles

2012-10-08 Thread Nicolas Ribot
Hi, You could create triangles by calling st_makeLine and st_makePolygon: select st_makePolygon(st_makeLine('{point1, point2, point3, point1}')) from triangles (the 4 points are put in a array before calling makeLine). Yes for the Gist index on the column. Nicolas On 8 October 2012 16:03, Ed L

Re: [postgis-users] ST_Polygonize

2012-10-08 Thread Nicolas Ribot
Hi, I think it will depend on the way your linestrings are related to each other. If each linestring forms a closed polygon, then it will be easy to add the appropriate column(s) in your select. If several lines can form one polygon, then you will have to choose which linestring attribute will be a

Re: [postgis-users] finding whether an object lies in vicinity of another object

2012-10-08 Thread Nicolas Ribot
Hi, You should read the first chapters of the Postgis documentation (http://postgis.org/documentation/manual-2.0/) : it introduces spatial data, spatial types and functions. Postgis is working on Geometry type, not on classic, "scalar" attributes. Nicolas On 8 October 2012 14:40, tasneem dewaswa

Re: [postgis-users] difficulty in adding postgis to existing postgreSQL database

2012-09-28 Thread Nicolas Ribot
Hi, http://postgis.org/documentation/manual-1.5/ch02.html#id2661925 Nicolas On 28 September 2012 08:25, tasneem dewaswala wrote: > Hello, > > I am very much new to postgreSQL and postgis. > I installed postgreSQL on my windows XP few months back. This are my version > details. > > "PostgreSQL 8

Re: [postgis-users] Postgis 1.5 core dumps on GEOSIntersects with side location conflict

2012-09-21 Thread Nicolas Ribot
Hi, On this 1.5 version, query is raising an error but does not crash the server: PostgreSQL 9.1.5 on x86_64-apple-darwin11.4.0, compiled by i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00), 64-bit POSTGIS="1.5.3" GEOS="3.3.5-CAPI-1.7.5" PROJ="R

Re: [postgis-users] RE : How to change the SRID of a table ingeometry_columns view

2012-09-14 Thread Nicolas Ribot
> Hello, > > I think you do not have to change the view but only update the original table > using st_SetSRID (http://postgis.org/docs/ST_SetSRID.html) and the view > should be automatically update. > > To change the SRID from your table you will certainly have to remove > constraints first. > >

Re: [postgis-users] How to change the SRID of a table in geometry_columns view

2012-09-14 Thread Nicolas Ribot
Hi, This is now possible thanks to the typemods, by altering the column: alter table mytable ALTER COLUMN geom TYPE geometry(MultiPolygon,2154) USING ST_setSRID(geom, 2154); (replacing the type by the one of the geom column) Nicolas On 14 September 2012 09:36, Stefan Schwarzer wrote: > Hi the

Re: [postgis-users] Creating a simple polygon encompassing a given number of points

2012-09-12 Thread Nicolas Ribot
Hi, I think you could cast geography to geometry to collect, then cast back to geography to store ? On 12 September 2012 17:42, René Fournier wrote: > Yes, this works great. > > UPDATE territories SET border = (SELECT > ST_ConvexHull(ST_Collect(ST_GeomFromText('MULTIPOINT(-111.868842 50.569455

Re: [postgis-users] RE : PostGIS 2.0 Raster Mosaic...

2012-09-11 Thread Nicolas Ribot
Hi, Leave -F to keep the column containing the name of the file and remove the -I option that creates the spatial index. You can also create the index only at the end (last image) to avoid updating the index for each new raster appended to the table Nicolas On 11 September 2012 18:43, Brian Fitz

Re: [postgis-users] Creating a simple polygon encompassing a given number of points

2012-09-10 Thread Nicolas Ribot
Hi, You could use st_convexHull on the point set and then buffer it with st_buffer. (st_concaveHull may give you better results on polygon approximation (see: http://postgis.refractions.net/documentation/manual-2.0/ST_ConcaveHull.html) Nicolas On 10 September 2012 20:39, René Fournier wrote: >

Re: [postgis-users] raster2pgsql build from source...

2012-09-07 Thread Nicolas Ribot
Hi, If you built Postgis from sources with right configure options, then I think raster2pgsql should be there, in the pgsql/bin directory if you run sudo make install Nicolas On 7 September 2012 18:09, Brian Fitzgerald wrote: > I've finally manged to get the following stack working > > - Linux

Re: [postgis-users] DEM models

2012-09-07 Thread Nicolas Ribot
Hi, GDAL seems to handle the format: http://www.gdal.org/frmt_various.html#SDTS. (format specs: http://mcmcweb.er.usgs.gov/sdts/sdtsfaq.html) So it could be converted into a postgis raster, or processed directly with GDAL/OGR. Nicolas On 7 September 2012 09:53, Ed Linde wrote: > Hi All, > I ju

Re: [postgis-users] Retrieving linestring data between endpoints

2012-09-06 Thread Nicolas Ribot
Hi, Maybe this thread about closing contour polylines can give some hints: http://postgis.refractions.net/pipermail/postgis-users/2012-May/034149.html Do you have sample data we could play with ? Nicolas On 5 September 2012 19:15, Max Pyziur wrote: > > Greetings, > > I'm trying to figure out a

Re: [postgis-users] upload a folder of raster files

2012-09-03 Thread Nicolas Ribot
Hi, A loop written in a script language (don't what platform you're using) should to that pretty easily. Nicolas On 3 September 2012 12:12, Giannis Giakoumidakis wrote: > I want to upload to a db a big number of raster files, pe 500, inside a > folder, named in a row (file_1 to file_500), each

Re: [postgis-users] [GENERAL] pg_dump -s should use add_geometrycolumn(...)

2012-08-29 Thread Nicolas Ribot
> On Wed, Aug 29, 2012 at 5:23 PM, Andres Freund wrote: >> >> That shouldn't be a problem with postgres 2 anymore as far as I understand >> things? > > > Why? > Hi, I think because of the new geometry typemod feature, and the fact that geometry_columns is now a view based on system tables (thank

Re: [postgis-users] RAM requirement of shp2psql and psql command for 368 MB data

2012-08-27 Thread Nicolas Ribot
> I haven't got PostGIS installed and have never used it. > However, I would quickly need to make an estimate of how much RAM > space would it require to run shp2psql and psql -f commands on shape > dataset, which size is 368 MB. > > Does any experience user have an estimate of how light/ heavy w

Re: [postgis-users] polygon_edges_numbering

2012-08-24 Thread Nicolas Ribot
(sorry, sent to fast...) with pg_pts_oriented as ( -- extract exterior ring points select st_dumpPoints( -- extract polygon's exterior as a linestring st_exteriorRing( -- force polygon orientation st_forceRHR( 'POLYGON (( 355 215, 390 220, 4

Re: [postgis-users] polygon_edges_numbering

2012-08-24 Thread Nicolas Ribot
dge_number, st_makeLine((p1.d).geom, (p2.d).geom) as edge from pg_pts_oriented p1, pg_pts_oriented p2 where (p2.d).path[1] = (p1.d).path[1] + 1; On 24 August 2012 10:24, Nicolas Ribot wrote: > Hi, > > Yes, it seems possible: > > • First force polygon orientation to be CW: st_forceRHR() >

Re: [postgis-users] polygon_edges_numbering

2012-08-24 Thread Nicolas Ribot
Hi, Yes, it seems possible: • First force polygon orientation to be CW: st_forceRHR() • Then, extract the polygons outer rings (st_exteriorRing) (if polygons have holes or are multipolygons, you may want to deal with these cases) • With st_dumppoints(), you will dump the points forming theses ext

Re: [postgis-users] where to publish my scripts?

2012-07-19 Thread Nicolas Ribot
Hi Tom, I personally publish these kind of scripts to the PostGIS wiki. Nicolas On 19 July 2012 17:18, Tom van Tilburg wrote: > ok. I will try a bit of plpgsql'ing. > > That reminds me to another question: > is there any place that people can drop their own scripts for a wider > audience? >

Re: [postgis-users] Super weird problem: Cannot insert more than ~300 rows (or ~100 kb) into a table

2012-07-10 Thread Nicolas Ribot
On Tue, Jul 10, 2012 at 02:06:43PM +0200, Nicolas Ribot wrote: >> > Ticket submitted: >> > >> > http://trac.osgeo.org/postgis/ticket/1903 >> > >> > But the crash problem seems not to happen for everyone. At least, the >> > attached

Re: [postgis-users] Export only a View from my database to .csv file

2012-07-10 Thread Nicolas Ribot
Hi, Look at the copy command: copy (select * from myview) to '/tmp/myview.csv' WITH (format CSV); Nicolas On 10 July 2012 12:25, José María Amuedo wrote: > Hello. > > I have a simple question, Is it possible to export a view from my database > to a .csv file? > > Thank you, > > José María >

Re: [postgis-users] Super weird problem: Cannot insert more than ~300 rows (or ~100 kb) into a table

2012-07-10 Thread Nicolas Ribot
> Ticket submitted: > > http://trac.osgeo.org/postgis/ticket/1903 > > But the crash problem seems not to happen for everyone. At least, the > attached SQL file will crash my PostgreSQL 1.5.4 on Mac OS X 10.7.4 every > time. But not for Paul. Would some of you be able to test it on your se

Re: [postgis-users] What have I got wrong?

2012-07-09 Thread Nicolas Ribot
Specifically, did you try createdb -p 5433 ? I'm not a Ubuntu specialist, but is it possible you already have a stock postgresql running on port 5432 and that the 9.1 version took the 5433 port to run on ? Nicolas On 9 July 2012 18:08, Nicolas Ribot wrote: > Hi, > > Is the Pos

Re: [postgis-users] What have I got wrong?

2012-07-09 Thread Nicolas Ribot
Hi, Is the PostgreSQL server started on port 5433 ? (default port is 5432) (ps aux |grep postgres may show you information about started postgres program) Nicolas On 9 July 2012 17:45, Phil Shea wrote: > Hi all, > > Apologies to everyone if this has already been documented before or if my > pro

Re: [postgis-users] Dumping out points in a linestring

2012-07-09 Thread Nicolas Ribot
Hi st_dumpPoints(geom) Nicolas On 9 July 2012 12:51, Ed Linde wrote: > Hi All, > Wondering how I can dump out all the points within a linestring or > multilinestring? > > Thanks, > Ed > > ___ > postgis-users mailing list > postgis-users@postgis.refrac

Re: [postgis-users] TopologyException and ST_Intersection

2012-06-25 Thread Nicolas Ribot
> Hi Nicolas, > This is great.  However, we are running POSTGIS="1.5.3"  Is this possible in > this version?  If not, is there a workaround as I don't think we will be > able to upgrade that quickely? > > Hi Derek Yes indeed, there is a trick on postgis < 2.0 to clean polygons: try using st_buffe

Re: [postgis-users] TopologyException and ST_Intersection

2012-06-25 Thread Nicolas Ribot
Hi, Check the validity of input geometries with st_isValid() and st_isValidReason() and if invalid objects are found, you can correct them using st_makeValid() Nicolas On 25 June 2012 03:18, Derek Morgan wrote: > I am attempting to get the area of intersection between to vector > polygon tables

Re: [postgis-users] vector layer manipulation

2012-06-25 Thread Nicolas Ribot
Hi, st_dumppoints will do that. Nicolas On 24 June 2012 13:52, chathura silva wrote: > suppose you are given the co-ordinates of starting and end points of a road > segment. > Is there any way to extract the other set of co-ordinates laying on the road > segment > ? > > An example +

Re: [postgis-users] snapping all close-by lines in a set of 500, 000

2012-06-18 Thread Nicolas Ribot
> Hello Nicolas, > thank you for the reply. I don't have enough experience with postgis to > understand how your suggestion helps. > Do you suggest to loop over all linestrings (which is really slow!) after > st_dumppoints, or is there a single command that does the snapping at once? > What is the

Re: [postgis-users] snapping all close-by lines in a set of 500, 000

2012-06-18 Thread Nicolas Ribot
Hello, I would create a table containing linestrings points (st_dumppoints) then search for all lines whose points are within 50 meters from another line, then either snap these points or remove the whole line. Based on your dataset, you may have to union linestrings based on attributes, to recrea

Re: [postgis-users] How to use dimension(geometry) command

2012-06-18 Thread Nicolas Ribot
> Hi, > > I meant dimension(geometry) to know if my consulted data is 2D or 3D. > > I found in the oficial documentation that if you use dimension(geometry) you > get 2 for 2D or 3 for 3D data. > > Do you know something about this? > ST_NDims is your friend in this case. Nicolas _

Re: [postgis-users] How to use dimension(geometry) command

2012-06-18 Thread Nicolas Ribot
Hi, you mean st_dimension ? select st_dimension(geom). Returns 0 for points, 1 for linestrings, 2 for polygons. Nicolas On 18 June 2012 09:37, José María Amuedo wrote: > Hello, > > I would like to know how can use the dimension(geometry) command. > > Thanks, > > Jose María > > _

Re: [postgis-users] Closed linestring is not closed?

2012-06-18 Thread Nicolas Ribot
Hi, Returns true here (POSTGIS="2.0.0" GEOS="3.3.2-CAPI-1.7.2" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.8" USE_STATS (procs from 2.0 r7948 need upgrade) On Mac OS X Whats your version ? Nicolas On 16 June 2012 09:11, georgew wrote: > The following linestring which I believed to be clo

Re: [postgis-users] RE : Linestring intersections + intersection order

2012-06-18 Thread Nicolas Ribot
> Hello, > > I think you could order your points using st_distance. Something like this > request should work : > > > select > st_distance(st_startpoint(a.the_geom), st_intersection(a.the_geom, > b.the_geom)), > st_intersection(a.the_geom, b.the_geom) the_geom > > from my_single_linestring a, my_

Re: [postgis-users] Postgres and two versions of Postgis running

2012-06-11 Thread Nicolas Ribot
Hi, Yes, you can install several postgis versions on the same PG instance. Each version will install in its own folder. Nicolas On 29 May 2012 14:09, José María Amuedo wrote: > Hello, > > I would like to know if can I install another versión of Postgis en the same > Postgres? > > I installed th

Re: [postgis-users] loading mostly identical states-based shapefiles

2012-05-26 Thread Nicolas Ribot
Hi Puneet, Concerning the first point, you will be able to control the column you want to load with the GDAL/OGR suite (gdal.org). ogr2ogr allows changing the structure of datasets during conversion. The -S switch is very handy when you are sure the input shapefile contains only simple objects (p

Re: [postgis-users] Closing polylines

2012-05-19 Thread Nicolas Ribot
Hi George, Glad I could help. I also learned a lot with this case. The "with recursive" queries are really powerful to process data. You could also use a plpgsql function to achieve the same result. It offers a great amount of control to process data. Regarding the SQL code I use, I'm wondering

Re: [postgis-users] Closing polylines

2012-05-18 Thread Nicolas Ribot
Hi, Yes indeed, open contours at map edges and several contours sharing the same elevation will complexify the process, as it will be necessary to identify those cases to avoid joining contours that should not be joined. One approach could be to choose a threshold distance above which contours sh

Re: [postgis-users] break lines at intersections

2012-05-17 Thread Nicolas Ribot
nother table?and delete them... > > thanks > > > Em 17-05-2012 15:41, Nicolas Ribot escreveu: > > Hi Pedro, > > select (st_dump(st_union(geom))).geom from lines; > > will cut your network of lines at intersections. > > Nicolas > > On 17 May 2012 11:57

Re: [postgis-users] break lines at intersections

2012-05-17 Thread Nicolas Ribot
Hi Pedro, select (st_dump(st_union(geom))).geom from lines; will cut your network of lines at intersections. Nicolas On 17 May 2012 11:57, Pedro Costa wrote: > does anyone know how I can cut the lines at intersectionslike the image > attached? > > I can´t install postgis 2.0 for now > > I

Re: [postgis-users] Closing polylines

2012-05-17 Thread Nicolas Ribot
Sorry, the correct version handling all cases. Seems to work when there are gaps between segments and when segments are touching each other: create or replace function st_makeShortestLine(g1 geometry, g2 geometry) returns geometry as $$ with dist as ( select st_distance(st_endPoint($1), st_endPo

Re: [postgis-users] Closing polylines

2012-05-17 Thread Nicolas Ribot
The st_makeShortestLine() function used: create or replace function st_makeShortestLine(g1 geometry, g2 geometry) returns geometry as $$ with dist as ( select st_distance(st_endPoint($1), st_endPoint($2)) as dee, st_distance(st_endPoint($1), st_startPoint($2)) as des, st_distance

Re: [postgis-users] Closing polylines

2012-05-17 Thread Nicolas Ribot
By the way, if your data are not too sensitive nor too big, could you provide me with a more complete dataset, to test against it ? Thank you very much. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/m

Re: [postgis-users] Closing polylines

2012-05-17 Thread Nicolas Ribot
Hi George, Beside the st_polygonize function I used yesterday, I made some other tests based on the previous code I sent, here are some remarks concerning this code: First, as I understand your data, they are coming from a shapefile format in which each feature is a simple line. Maybe a loading w

Re: [postgis-users] Closing polylines

2012-05-16 Thread Nicolas Ribot
Hi, I will have a look at it. Nicolas On 15 May 2012 11:17, george wash wrote: > Sorry Nicolas, the attachment is in a normal dump format, not shapefile > format > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http:/

Re: [postgis-users] Closing polylines

2012-05-14 Thread Nicolas Ribot
Hi, Glad it helped. Doing some more tests yesterday (based on true contour lines and not hand-made :) ) I noticed 2 problems in the code I gave you: 1°) The distance computation performed to identifiy closest segment should only use start/end points of each segment, and not the whole segment. So

Re: [postgis-users] Same, similar et al

2012-05-09 Thread Nicolas Ribot
Hi, Doen't the st_hausdorffDistance function compare shapes of geometries ? Nicolas On 9 May 2012 19:36, wrote: > Another aproach could be to compare angles in each vertex "corner". If all > angles are the same in some sort of tolerance the shape should be the same. > > > Jusr a thought > > >

Re: [postgis-users] Differences between schemas on different servers

2012-05-02 Thread Nicolas Ribot
Hi, You could use a script (batch, shell...) to query the 2 databases and report informations on each table. Concerning knowing latest transaction on a table, it doe not seem easy to do if triggers do not exist on the table to track down changes. (I may not be right...). NIcolas On 26 April 2012

Re: [postgis-users] postgis-users Digest, Vol 122, Issue 30

2012-05-01 Thread Nicolas Ribot
Go to postgis sources/java make Jar file will be generated at java/jdbc/target/ Nicolas On 30 April 2012 22:04, Brian Sanjeewa Rupasinghe wrote: > How to build PostGIS 2.0 jar file from SVN. Any instructions? > On Mon, Apr 30, 2012 at 8:00 PM, > wrote: >> >> Send postgis-users mailing list sub

Re: [postgis-users] PostGIS 2.0 connection to Java

2012-05-01 Thread Nicolas Ribot
You can find a cached copy here: http://www.java2s.com/Code/Jar/p/Downloadpostgis200SVNjar.htm Nicolas On 30 April 2012 17:10, Brian Sanjeewa Rupasinghe wrote: > Hi, > > Where can i find postgis 2.0.jar file to connect postGIS with Java. Link in > the PostGIS site is broken. > > Brian. > >

Re: [postgis-users] [!! SPAM] multipolygon to single polygon

2012-04-26 Thread Nicolas Ribot
Sorry, I read too quickly. I suggested what you tried ;) what query are you running and what are your data to obtain multipolygons ? Nicolas On 26 April 2012 17:32, Nicolas Ribot wrote: > Hi, > > As Julien suggested, you could st_dump to explode multipolygons into > polygons, the

Re: [postgis-users] [!! SPAM] multipolygon to single polygon

2012-04-26 Thread Nicolas Ribot
Hi, As Julien suggested, you could st_dump to explode multipolygons into polygons, then union them. It will produce a single polygon unioning all others: with t as ( select (st_dump(geom)).geom from my_table ) select st_union(geom) from t; Nicolas On 26 April 2012 17:22, Mehmet Erkek w

Re: [postgis-users] Question about the right installation of postgis 2.0.0

2012-04-18 Thread Nicolas Ribot
On 18 April 2012 18:12, Giannis Giakoumidakis wrote: > So if I installed it correct, my next question is how I enable Postgis2.0.0 > in PgAdminIII (i have the 1.12.2-1 version). I created a new database with > "template_postgis" but when I ask "select postgis_full_version()" I get > "POSTGIS=1.5.3

Re: [postgis-users] Returning contiguous linestrings

2012-04-18 Thread Nicolas Ribot
On 17 April 2012 19:21, Bob Pawley wrote: > Hi > > I have a polygon shape composed of contiguous linestrings inhabiting > different rows. > > Is there a fairly direct procedure for returning the polygon after detecting > a single linestring?? > > Bob > Hi Bob, Could you explain a bit further wha

Re: [postgis-users] function comments

2012-04-16 Thread Nicolas Ribot
>>> >>> Hi list, >>> After building from src or installing postgis 2 from repository >>> (opensuse) I >>> cant find the sql comments files: postgis_comments.sql, etc. >>> The create extension system include the comments though. >>> >>> According to the manual the comments files should be there for

Re: [postgis-users] function comments

2012-04-16 Thread Nicolas Ribot
> Hi list, > After building from src or installing postgis 2 from repository (opensuse) I > cant find the sql comments files: postgis_comments.sql, etc. > The create extension system include the comments though. > > According to the manual the comments files should be there for postgres <= > 9.0 >

Re: [postgis-users] Simplifying a multipolygon layer, keeping polygon connection

2012-04-13 Thread Nicolas Ribot
Thank you Sandro for this showcase. I just answer because I do not receive through gmail the answers of the thread I initiated. Only answers sent by others, like you Jose. Strange. Nicolas On 13 April 2012 15:28, Jose Carlos Martinez wrote: > nice example, > these kind of examples show the power

Re: [postgis-users] Simplifying a multipolygon layer, keeping polygon connection

2012-04-11 Thread Nicolas Ribot
On 11 April 2012 11:23, Sandro Santilli wrote: > On Wed, Apr 11, 2012 at 11:14:48AM +0200, Nicolas Ribot wrote: > >> Yes, here are some stats: >> >> Mac OS X Snow Leopard, SSD drive, 8 gb ram >> shared_buffers = 5120MB >> work_mem = 1024MB >> >> PO

Re: [postgis-users] Simplifying a multipolygon layer, keeping polygon connection

2012-04-11 Thread Nicolas Ribot
On 11 April 2012 10:15, Sandro Santilli wrote: > On Wed, Apr 11, 2012 at 10:01:12AM +0200, Nicolas Ribot wrote: >> On 10 April 2012 12:04, Sandro Santilli wrote: >> > On Mon, Apr 09, 2012 at 07:33:41PM +0200, Nicolas Ribot wrote: >> >> Hmm much easier with Postgis T

Re: [postgis-users] Simplifying a multipolygon layer, keeping polygon connection

2012-04-11 Thread Nicolas Ribot
On 10 April 2012 12:04, Sandro Santilli wrote: > On Mon, Apr 09, 2012 at 07:33:41PM +0200, Nicolas Ribot wrote: >> Hmm much easier with Postgis Topology... >> >> (thanks Brent for the Topology example) >> >> By the way, is it the right way to use topology to si

Re: [postgis-users] ST_Boundary(geometry) for polyon to line conversion?

2012-04-11 Thread Nicolas Ribot
> Hi, > > ST_Boundary(geometry) > > Is this the function I would use to convert a polygon to a polyline? > > yours, > > > Rob Hi, Yes, but depends on the shape of the polygon. If it has holes, st_boundary will return several linestring, for the exterior and for each hole. If you need only the ext

Re: [postgis-users] Invalid SRID for geography type: ee4

2012-04-11 Thread Nicolas Ribot
Hi, Geography type supports only EPSG:4326. First load your data as geometry, then change SRS and cast them to geography. Nicolas On 10 April 2012 22:50, Philippe wrote: > Hello, > I'm running into an issue loading data from the Belgium IGN. > I can transform a shapefile into Postgis loadable da

Re: [postgis-users] Simplifying a multipolygon layer, keeping polygon connection

2012-04-09 Thread Nicolas Ribot
_area(sf.geom) > 0.5; Nicolas On 9 April 2012 01:02, Nicolas Ribot wrote: > For those interested, I've added an entry to the postgis wiki showing > an example of polygon layer simplification: > > http://trac.osgeo.org/postgis/wiki/UsersWikiSimplifyPreserveTopology > > Nic

[postgis-users] Simplifying a multipolygon layer, keeping polygon connection

2012-04-08 Thread Nicolas Ribot
For those interested, I've added an entry to the postgis wiki showing an example of polygon layer simplification: http://trac.osgeo.org/postgis/wiki/UsersWikiSimplifyPreserveTopology Nicolas ___ postgis-users mailing list postgis-users@postgis.refractio

Re: [postgis-users] interpolate and extract points from line

2012-04-08 Thread Nicolas Ribot
Glad to read it helped you, Gery. Yes indeed, Postgis is an amazing tool to process data. The new 2.0 release is really powerfull, thanks to the team ! Nicolas On 8 April 2012 16:32, Gery wrote: > Thank you very much! just to thank you Nicolas because it did work! your last > code really did th

Re: [postgis-users] interpolate and extract points from line

2012-04-08 Thread Nicolas Ribot
On 8 April 2012 13:32, Gery wrote: > Thanks for the answer, I tried st_segmentize and segmentize (I think they are > the same, at least the provide the same result) with the same formulation as > I showed before but instead of having 245 points (I think it produces > segments instead) I got 269 as

Re: [postgis-users] interpolate and extract points from line

2012-04-08 Thread Nicolas Ribot
And even better: starting generate_series at 0 will give you the 245 points you're expecting: select st_line_interpolate_point( geom, generate_series(0, seg_fldr-1) * (1/(seg_fldr::float - 1)) ) as geom from smoothnav_line_wgs84; ;) On 8 April 2012 13:19, Nicolas Ribot wrote: > Hi

Re: [postgis-users] interpolate and extract points from line

2012-04-08 Thread Nicolas Ribot
Hi, Is st_segmentize() not enough to add points to your lines ? And are you sure you want to compute distance in decimal degrees ? there is the st_distanceSphere() function to compute distances on lat long data. Concerning the line interpolation, I think you are misusing the generate_series and s

Re: [postgis-users] Importing timezone shape files - newbie

2012-04-05 Thread Nicolas Ribot
> Can someone explain the difference between the two types of shape > files and the advantages/disadvantages of each in more general terms? > As far as I understandd from http://efele.net/maps/tz/world/: "and a TZ timezone will sometimes have multiple polygons. " for the first file, and " and the

Re: [postgis-users] Importing timezone shape files - newbie

2012-04-05 Thread Nicolas Ribot
> Hi all, > > I'm using PG 9.1.3 with pgAdmin 1.14.2 on Windows 7 Home Edition to > get familiar with PostGIS and TimeZone data. > PostGIS 1.5.3 is installed and the postgis database was created by the > installer. > > My immediate end goal is to be able to take a Lat/Lon and query PG to > find the

Re: [postgis-users] segmenting a linestring geometry

2012-04-02 Thread Nicolas Ribot
Hmm, not sure it could work: ** Error ** ERROR: Splitting a Line by a MultiPoint is unsupported SQL state: XX000 On 2 April 2012 20:42, Nicolas Ribot wrote: > On 2 April 2012 20:30, Ed Linde wrote: >> Thanks Nicolas. I thought there was a simple way of d

Re: [postgis-users] segmenting a linestring geometry

2012-04-02 Thread Nicolas Ribot
On 2 April 2012 20:30, Ed Linde wrote: > Thanks Nicolas. I thought there was a simple way of doing this :) > :) With Postgis 2.0, you could maybe use the st_split function, giving it the line and the collection of points forming the line ? Nico ___ pos

Re: [postgis-users] segmenting a linestring geometry

2012-04-02 Thread Nicolas Ribot
On 2 April 2012 19:38, Ed Linde wrote: > Hi All, > I see that ST_Segmentize allows me to introduce points to a line string "x" > meters apart. I was wondering if > there was a way to break the line string so that I can get lines "x" meters > in length returned as separate rows.. > all belonging to

Re: [postgis-users] simplify a geom, and now what??

2012-04-02 Thread Nicolas Ribot
Or, if you want to create the table from scratch: create table sometable as select ... Nicolas On 2 April 2012 19:44, Gery wrote: > so simple, thanks Bob ;) > > -- > View this message in context: > http://postgis.17.n6.nabble.com/simplify-a-geom-and-now-what-tp4679563p4679644.html > Sent from

Re: [postgis-users] ST_AsText() from an array of geoms

2012-04-02 Thread Nicolas Ribot
>> Hi, >> >> I'm trying to select ST_AsText from an array of geometries. >> This function doesn't support arrays. >> >> How should I proceed to get the array's geoms as text? >> >> Any help appreciated ;) >> > > select st_astext(generate_subscripts(myarray, 1) from mytable; > > Nicolas Sorry: Hi,

Re: [postgis-users] ST_AsText() from an array of geoms

2012-04-02 Thread Nicolas Ribot
> Hi, > > I'm trying to select ST_AsText from an array of geometries. > This function doesn't support arrays. > > How should I proceed to get the array's geoms as text? > > Any help appreciated ;) > select st_astext(generate_subscripts(myarray, 1) from mytable; Nicolas ___

Re: [postgis-users] Postgis geometries to KML

2012-04-02 Thread Nicolas Ribot
> Hi, > Does anyone know of a way to generate a KML file directly from postgis > geometries? I have open street map road geometries stored in a > table which I would like to dump out as a KML to visualise on Google Earth. > Would love to hear if someone has already done something > like this in the

Re: [postgis-users] Break lines at intersections

2012-03-28 Thread Nicolas Ribot
On 28 March 2012 15:43, Pavel Iacovlev wrote: > Thank you for you help Sandro, > > As I understand something like this in theory: > SELECT ST_Node(ST_Collect(the_geom)) FROM roads; > Then I generate series from the result and using ST_Contains find to > what initial "road" geometry the segment bel

Re: [postgis-users] import mif file to postgis

2012-03-28 Thread Nicolas Ribot
> hello > > i have some mif files,i want to import them to postgis directly,is it > possible? > > BTW: i usually convert mif to shp,and convert shp to sql,then import sql,it > is too much steps~~ > > Hi GDAL/OGR can do that. Nicolas ___ postgis-users ma

Re: [postgis-users] More details for errors

2012-03-27 Thread Nicolas Ribot
> Yes, it is 2.0 > http://postgis.refractions.net/documentation/manual-svn/ST_CollectionHomogenize.html > > Well, I am turning around the problem... > I have to do a cast, as I used > ST_Multi(ST_LineMerge(ST_Union(wkb_geometry)))::geometry(MultiLineString,xxx) > in the first view to prevent errors

Re: [postgis-users] More details for errors

2012-03-27 Thread Nicolas Ribot
On 27 March 2012 16:09, Denis Rouzaud wrote: > Hi Nicolas, > > Thanks again. > > Well, this working, but this not performant... > > Based on your suggestion, I tried this: > in view1: > ST_Multi(ST_LineMerge(ST_Union(wkb_geometry)))::geometry(MultiLineString,21781) > AS wkb_geometry > > Then in vi

Re: [postgis-users] More details for errors

2012-03-27 Thread Nicolas Ribot
On 27 March 2012 08:02, Denis Rouzaud wrote: > Hi Nicolas, hi all, > > Thanks for your reply. > > The problem is: > - I cannot filter my view using where geometryType(wkb_geometry) = > 'LINESTRING' as it will still return the same error > - I cannot check the result of ST_LineMerge in the where cl

  1   2   3   4   >