Re: [postgis-users] Spatially ordering data

2017-03-01 Thread Rémi Cura
hey, the most classical approach would be to construct a quad tree . You can think of it as a grid that adapts its resolution locally according to the data. This is also easy to code. Cheers, Rémi-C 2017-03-01 12:46 GMT+01:00 Darafei "Komяpa" Praliaskouski

Re: [postgis-users] Intersection of three polygons

2017-02-20 Thread Rémi Cura
Hey, sorry to say it's very difficult to understand what you want to do. Please either do a schema or a precise description (with math: you have setA, set B, setC , and you want to find ...). Cheers, Rémi-C 2017-02-20 5:57 GMT+01:00 Saranya Kuniyil : > Hi all, > I am new

Re: [postgis-users] ST_value slow

2017-02-04 Thread Rémi Cura
Hey, I suppose your raster is correctly cut into small pieces. You should first try to clock one point value retrieval. It should be < 50ms (or you have an index issue) Then you could force the use of index by writting a function update_one_point(point) $$ update XXX set XXX WHERE

Re: [postgis-users] ST_CurveToLine: Avoid slivers and overlaps in postgis 2.1

2017-01-30 Thread Rémi Cura
Hey, if your cases are always like those in your illustrations, problem is tractable without too much effort. (for polygon sharing an arc, get list of arcs, deduplicate list, change arcs into linestring, rebuild polygon using linestring). If you want a solution in all generality (for instance

Re: [postgis-users] Improve 3D BB query on large set of lines

2017-01-19 Thread Rémi Cura
Hey, This is an interesting problem for sure. AS always in the "slow query" topic, improvement can come from a number of places - hardware : are your tables on SSD, does your index fit in RAM - postgres tuning : you have customised postgresql.conf to fit your hardware - query writing : your

Re: [postgis-users] Understanding 3d bbox filtering support

2017-01-18 Thread Rémi Cura
Hey, I can't test right now, but : - you have the same srid for object and bbox right? - I remember Sandro discussing this case Cheers, Rémi-C 2017-01-18 14:47 GMT+01:00 Andrea Aime : > Hi, > I'm trying to perform a "simple" 3d bounding box filter against a

Re: [postgis-users] CPU tuning

2017-01-09 Thread Rémi Cura
e) and then begin using disk about 10 Mo/s. So I'm still > wondering why the cpu doesn't go further than 30% and why this take such a > difference on your machine. Is it a linux OS ? > > > > Olivier > > > > > > *De :* postgis-users [mailto:postgis-users-boun...@lists.o

Re: [postgis-users] CPU tuning

2017-01-09 Thread Rémi Cura
Hey, I ​'m afraid you may not use the most efficient approach. Assuming you want to find for each node of table x the closest node of table y, it takes less than 1 second on my computer. DROP TABLE IF EXISTS test_1; CREATE TABLE test_1 AS SELECT s AS gid,

Re: [postgis-users] Query choces on searching too small area

2016-12-19 Thread Rémi Cura
@Paul, that's what I thought, but it seems querry can't be un-rolled like this, because one row will have only one key. (no one row will match all the conditions, you have to get several rows and perform intersection of results). I fully agree this is totally bad for postgres, I would guess Arjen

Re: [postgis-users] Query choces on searching too small area

2016-12-16 Thread Rémi Cura
Hey, there is a dedicated "slow query" protocol on postgres user list, and its quite sane. For instance, it would suggest you to give the version number you use, your hardware, etc etc. About you query, I guess your photo are geotagged (i.e. each photo is a point, and maybe you have a precision

Re: [postgis-users] number all houses on branch roads first

2016-07-13 Thread Rémi Cura
Would be much easier to send your graph to python networkx If you have plpython, this is immediate (line 368) I found it painful to

Re: [postgis-users] Performance external loop, WHERE IN (values), stored procedure or else to pass data to SQL query

2016-06-16 Thread Rémi Cura
used > (?) and query take about 500ms. 500 points x 500ms => 250s which is quite a > lot and I do not take into account time spent on python side. That's the > problem. > > Thanks Michal > > On 06/14/2016 10:36 AM, Rémi Cura wrote: > >> Hey, >> I fiind it diffi

Re: [postgis-users] ST_Split with Multilinestring

2016-06-16 Thread Rémi Cura
Hey, I wrote a multi-friendly st_split a while ago. Maybe it will help you: https://github.com/Remi-C/_utilities/blob/master/postgis/rc_split_multi.sql Cheers, Rémi-C 2016-06-15 19:19 GMT+02:00 Birgit Laggner, vTI : > Hi Sandro, > > yes, I read so, too. But, our

Re: [postgis-users] PL/Python

2016-05-21 Thread Rémi Cura
Hey, debuggin plpython is a bit of a pain. Maybe you are aware that you can use plpy.notice to print values during execution. This blog seems to indicate that what you do should work: driver = gdal.GetDriverByName(

Re: [postgis-users] Call for Case Studies and knowledge about who uses PostGIS and how

2016-03-25 Thread Rémi Cura
Hey, short testimony about using Postgres/PostGIS for prototyping/research. I used extensively postgis (+ecosystem) for my phd thesis, in several ways. The first is that PostGIS is a good steady horse (elephant?): a database is the perfect place to store a lot of very different information in the

Re: [postgis-users] Slow performance when selecting a geometry column

2016-03-21 Thread Rémi Cura
Hey pgadmin takes a long time to __display__ the result of any query. If you want a somehow better timing, user EXPLAIN ANALYSE, that is Maj+F7. It will perform all the real computing, plus some time for measure, but no time for output. Cheers, 2016-03-18 15:43 GMT+01:00 Paul Ramsey

Re: [postgis-users] split line at polygon edge

2016-03-20 Thread Rémi Cura
ions as d; > > #create table public.temp_trail_div_sep as select * from > public.temp_trail_div1 where ST_GeometryType(geom) like '%Line%'; > > This seems to have done the trick, for now. Could someone enlighten me on > how that might be done in one statement? > > Thanks again, > Ga

Re: [postgis-users] split line at polygon edge

2016-03-19 Thread Rémi Cura
Hey, two things : recent version of QGIS are boringly strict about geometry type, so if you want to be able to add the corresponding postgis layer to qgis, you may have to explicitely cast the result. QGIS also require a unique identifier per row, which you can fabricate with row_number() for

[postgis-users] postgis logo (vector : svg, pdf)?

2016-03-01 Thread Rémi Cura
Hey dear list, looking for a vector version of the postgis official logo. I know I could reverse vectorize it from image, but anybody has it somewhere? Cheers, Rémi-C ___ postgis-users mailing list postgis-users@lists.osgeo.org

Re: [postgis-users] Geoprocessing & BigData

2016-01-18 Thread Rémi Cura
Hey, if you have one beefy server you can parallelize throwing several queries working on sub set of your data. (aka parallel processing trough data partition). One conceptual example : you want to process the world, you create 20 workers, a list of countries, and then make the worker process the

Re: [postgis-users] PostGIS data in the marine environment

2015-12-02 Thread Rémi Cura
How you store data depends on how you expect to search/use it. If you are going to need to be able to search for say all the values of water temperature in a given area at a given depth, you have to store all measurement points individually. (this is usefull if you do interpolation, create

Re: [postgis-users] Error with ST functions

2015-11-19 Thread Rémi Cura
As an addition, you need to have the public schema in your search path, at least. It is the case by default, unless you tweeked it. SET search_path TO 'public' ; Cheers, Rémi-C 2015-11-18 19:59 GMT+01:00 Sandro Santilli : > On Wed, Nov 18, 2015 at 07:54:19PM +0100, Lorenzo

Re: [postgis-users] topology : statue of topogeom composition?

2015-11-16 Thread Rémi Cura
Thanks! Cheers, Rémi-C 2015-11-16 8:49 GMT+01:00 Sandro Santilli <s...@keybit.net>: > On Thu, Nov 12, 2015 at 06:43:03PM +0100, Rémi Cura wrote: > > > First of all is it possible to have topogeometry composed of other > > topogeometry, themselves composed of other geome

Re: [postgis-users] visualising 3d lines in postgis with SFCGAL

2015-11-15 Thread Rémi Cura
Depending on your density of point, you may want to use Lidar software, like CloudCompare. It can reads shapefile in latest version Cheers, Rémi C 2015-11-15 15:03 GMT+01:00 Nicolas Ribot : > Hi, > > QGis has 2 nice plugins (that I know of) to display 3D data coming from

[postgis-users] topology : statue of topogeom composition?

2015-11-12 Thread Rémi Cura
Hello everybody. a question mostly for Sandro I'm afraid. What is the current status of postgis topology regarding composition between topogeometry? First of all is it possible to have topogeometry composed of other topogeometry, themselves composed of other geometry, and so one? Second, if

Re: [postgis-users] invalid join selectivity: 179531936.000000

2015-09-25 Thread Rémi Cura
Yep, I had the same problem https://trac.osgeo.org/postgis/ticket/2543 The issue is that this bug is hard to reproduce. As a workaround, you can try to drop and recreate the table : DROP TABLE VACUUM FULL ANALYZE CREATE TABLE CREATE INDEX Cheers, Rémi-C 2015-09-25 1:32 GMT+02:00 Paul J.

Re: [postgis-users] $libdir/postgis-2.1: No such file or directory

2015-09-15 Thread Rémi Cura
Hey, have you check that the postgis-2.1.so file exists somewhere beside the compile folder? (captain obvious) you may need to restart the postgres server (captain obvious) Need admin right when installing postgis, after compile. If you compile yourself, some use of the command `ldconfig` at

Re: [postgis-users] perform intersection on large tables

2015-09-03 Thread Rémi Cura
Hey, not trying to insult anyone here, but you look like you should start with the basics, aka read a basic SQL tutorial for concept of join, then (join, 2 tables properly indexed ) --do one time CREATE INDEX ON my_table_1 USING GIST(geom) ; CREATE INDEX ON my_table_2 USING GIST(geom) ; --your

Re: [postgis-users] How can I upload .shp files?

2015-08-19 Thread Rémi Cura
Other options : Grass gis Gdal Gdal-python Cheers Rémi Le 19 août 2015 09:51, Elmehdi OUADOUD ouadoud.elme...@gmail.com a écrit : Hi You have 3 solutions: 1-Use QGIS specialy PostGIS Manager and import your shp files to database; 2-Use PostGIS plugin PostGIS shapefile Import/Export

Re: [postgis-users] Is it possible to do constraint exclusion based on spatial extents?

2015-08-02 Thread Rémi Cura
Hey, I asked this question to the postgres mailing list here: http://www.postgresql.org/message-id/CAJvUf_szgMLxC4=b6+agy9hgypares2jvb6btkxiff6cxa_...@mail.gmail.com I would be very interested if you find a solution (I did not). Cheers, Rémi-C 2015-08-02 21:04 GMT+02:00 Stephen Woodbridge

Re: [postgis-users] St_dumpAsPolygons function is too slow

2015-07-21 Thread Rémi Cura
If you have a decently recent postgres, you could maybe save time (at least it is more readable): *SELECT dmp.geom, dmp.valFROM * *my_raster a, ST_DumpAsPolygons(a.raster) AS dmp* CHeers, Rémi-C 2015-07-20 15:28 GMT+02:00 Elmehdi OUADOUD ouadoud.elme...@gmail.com: For example: For a DEM

Re: [postgis-users] Split(line, point), a temporary version until ST_Split gets fixed

2015-07-17 Thread Rémi Cura
-at-intersection-points/115982#115982 - Now i'm testing your function but i still got really delayed for result and dunno if i got messy rows.. ... :\ Vladimir. El martes, 4 de marzo de 2014, 12:54:33 (UTC-3), Rémi Cura escribió: Hey List, here is a link a link

Re: [postgis-users] Visualizing PostGIS 3D geometries

2015-07-08 Thread Rémi Cura
Hey, I went trough a similar quest recently. The only solution I found that worked easily was to export the 3D shapefile, and visualize it in an external software (in my case , CloudCompare ) Sadly it's difficult to find a mature x3d viewer. Cheers, Rémi-C 2015-07-08 13:22 GMT+02:00 Tom van

Re: [postgis-users] Distance between two furthest points of a group

2015-06-30 Thread Rémi Cura
fast. /Nicklas Sent from my Cat® phone. Den 27 jun 2015 13:25 skrev Rémi Cura remi.c...@gmail.com: Maybe I'm wrong, but your 2 farthest points should be on the boundary of the maximum bounding circle (feels right but couldn't prove it). Thus you would compute this circle, then filter

Re: [postgis-users] Distance between two furthest points of a group

2015-06-27 Thread Rémi Cura
Maybe I'm wrong, but your 2 farthest points should be on the boundary of the maximum bounding circle (feels right but couldn't prove it). Thus you would compute this circle, then filter points not too far from it, then take the points with the max distance using an inner join (same as Nick, but

Re: [postgis-users] Distance between two furthest points of a group

2015-06-26 Thread Rémi Cura
Hm, I don't understand your problem. The circle seems to be the perfect solution. Do you mean the function returns nothing? Maybe you could try to scale down you points(scaling down centered of centroid of your points )?. Cheers, Rémi-C 2015-06-26 13:54 GMT+02:00 Jonathan Moules

Re: [postgis-users] Computing the lenght of a building's edges looking on a direction

2015-06-17 Thread Rémi Cura
Hm, quite easy normally (method proposed above won't work). First break your polygon into segment, for instance with https://github.com/Remi-C/_utilities/blob/master/postgis/rc_DumpSegments.sql Then, for each segment, compute the angle between first and last point, using ST_Azimuth, and

Re: [postgis-users] Expand odd shapes

2015-06-10 Thread Rémi Cura
Why not use ST_DWithin with the original triangle, it is the best option regarding speed and precision. Cheers Remi-C Le 10 juin 2015 01:30, Andy Colson a...@squeakycode.net a écrit : At first I thought no, because it creates a circle around a point: Returns a geometry that represents all

Re: [postgis-users] Get only the main river. Smoothline???

2015-06-08 Thread Rémi Cura
if you have start and end point of geom B, you can get the river path with a shortest path method (one liner using python, can be done in few hours using plpgsql). The idea is that you cut your geom into segments(pairs of points) , the length of the segment is the weight of this edge , and you

Re: [postgis-users] Import TIN via SQL COPY from file

2015-06-05 Thread Rémi Cura
Hey first copy has a couple of options that you should check. Secondly find one correct tin as text, and check that you can use st_geomfromtext on this tin, to be sure it is correct. Then create a test file with only the found tin with correct encoding and end of line. You should be ok . Chers

Re: [postgis-users] memory usage of st_clip/st_intersection in a session

2015-06-03 Thread Rémi Cura
Hey, could it be that in the first case you perform everything into one transaction? Chers, remic Le 2 juin 2015 20:52, Bborie Park dustym...@gmail.com a écrit : Based upon your description, I can't guess as to the cause of the memory leak(?). Can you post the query and provide some

Re: [postgis-users] postgis raster data in JavaEE

2015-06-03 Thread Rémi Cura
Hey, http://gdal.org/java/ Cheers, Rémi-C 2015-06-03 14:08 GMT+02:00 Ahmet Temiz ahmettemi...@gmail.com: hello What are the ways to retrieve postgis raster data into JavaEE and display it using java ? Can you provide hints ? ​kind regards​ -- Ahmet Temiz Jeoloji Müh. Afet ve Acil

Re: [postgis-users] creating topology data is slow

2015-06-02 Thread Rémi Cura
I'm working on a batch way to import topology, it is not ready yet. If you now for sure your data is correct, you can skip a lot of testing and be efficient in a batch way. You could use grass and the topological export. Cheers, Rémi-C 2015-06-02 19:25 GMT+02:00 Marc-André Goderre

Re: [postgis-users] Slow ST_Intersects and Materialized Views

2015-05-27 Thread Rémi Cura
Damn, send too early. Your query feels awkward, if you want the link between layer and parcel, you should have at least 2 terms in the select. When you precise a little bit why your query is slow, it will be possible to propose solutions adapted. Cheers, Rémi-C 2015-05-27 10:19 GMT+02:00 Rémi

Re: [postgis-users] Slow ST_Intersects and Materialized Views

2015-05-27 Thread Rémi Cura
Hey, the type of info you should consider to give for a meaningfull answer : https://wiki.postgresql.org/wiki/Slow_Query_Questions The slowness could come from many things. For instance layer.id = 339 AND ST_Intersects(layer.geom_4326, parcel.geom_4326); You use 2 conditions, postgres might

Re: [postgis-users] Using Postgis raster for water elevation

2015-05-27 Thread Rémi Cura
Hey, Map Algebra? (custom function with a thresholding?) Cheers, Rémi-C 2015-05-27 14:57 GMT+02:00 Gabriel Vatin gabriel.va...@kinaxia.fr: Hello all, I'd like to have some feedbacks on an operation that should be possible with Postgis raster, but I can't find out how to do this. I have a

Re: [postgis-users] Best projection srid for topology

2015-05-27 Thread Rémi Cura
Hey, maybe you should choose whatever srid reduce the number of digits, for the sake of precision Cheers, Rémi-C 2015-05-27 17:32 GMT+02:00 Marc-André Goderre magode...@cgq.qc.ca: Hello all, I'm working on a many million lines topology project with OSM data in 4326 srid. I'd like to know if i

Re: [postgis-users] retrieving st_slope output into java

2015-05-16 Thread Rémi Cura
ST_Slope returns a postgis raster. You would need to convert this to something java can understand, there are numerous options. You could stay in the raster world and use any raster format you like (tiff, jpeg, etc). You could get the slope as an array of values with

Re: [postgis-users] Quick/unobstrusive way to determine if a geometry has curve elements?

2015-05-05 Thread Rémi Cura
Putting an exception block will slow down your function. You can put an exception in any plpgsql function. So you only need the right to create a plpgsql function. Cheers, Rémi-C 2015-05-05 11:45 GMT+02:00 Andrea Aime andrea.a...@geo-solutions.it: On Tue, May 5, 2015 at 11:35 AM, Nicolas

Re: [postgis-users] Beginning in PostGIS

2015-04-18 Thread Rémi Cura
maintaining your data model is easy to do with triggers. About copy / past. Sorry this just doesn't make much sense to me. You can import shapefile into postgres if it is the question. You can also use trigger on the import table to fill you rmodel with the imported data. Cheers, Rémi-C

Re: [postgis-users] Beginning in PostGIS

2015-04-18 Thread Rémi Cura
, Rémi-C 2015-04-18 23:36 GMT+02:00 Luciano br.analista...@gmail.com: Very good !! based on Remi's advice and some adjustments, it worked! Now the table is updating using the SQL Editor or the Qgis. Thank you all! 2015-04-18 16:19 GMT-03:00 Rémi Cura remi.c...@gmail.com: Ok

Re: [postgis-users] Partitionning using geometry

2015-04-04 Thread Rémi Cura
Hey, I explore the possibility to store thousands of Billions of points into postgres (without partitionning, 10's billion, with partitionning, 1000's billions). MongoDB is actively researched for this [1] and [2], with exciting perspective, and several downfall as well. I think you may mixing

Re: [postgis-users] Partitionning using geometry

2015-04-03 Thread Rémi Cura
Hey, thanks for the answer Mark (I saw your pg_routing mail, I never used pg_routing, so I asked a co_worker and I'm waiting his answer)! What I want to achieve is slightly different. It is not a processing issue (one big table, cutting it in pieces to process it faster trough pl/R, pl/python,

Re: [postgis-users] Partitionning using geometry

2015-04-03 Thread Rémi Cura
. There are restrictions though. Coordinates must be in lat/lon for instance. http://postgis.net/docs/ST_GeoHash.html Arnaud Le 3/04/2015 10:49, Rémi Cura a écrit : Now postgres offers partitioning, that is that you build a hierarchy of tables. In this case, you would have one empty father

Re: [postgis-users] Fwd: Partitionning using geometry

2015-04-02 Thread Rémi Cura
) AND (st_y(geom) = 6::double precision)) The test_child2 table is excluded in this plan. Nicolas On 2 April 2015 at 10:12, Rémi Cura remi.c...@gmail.com wrote: In theory, they use check for partitionning. It is possible (but inneficient) that check will overlaps (they give one such example

[postgis-users] Fwd: Partitionning using geometry

2015-04-01 Thread Rémi Cura
(cross-post from postgres list) Hey dear list, I'd like to partition geographical (geometry) data with postgres mechanism. (my usage is in fact related to pointcloud, but I use geometry as a work around) From example I read on constraint, nothing should prevent it from working Here is a self

Re: [postgis-users] Problem to visualize raster data from PostGIS inQGIS

2015-03-31 Thread Rémi Cura
Hey, I would recommand gdalinfo. You may need a recent gdal to properly display raster in QGIS (with a recent QGIS version also) Cheers, Rémi-C 2015-03-31 16:05 GMT+02:00 Hugues François hugues.franc...@irstea.fr: Hello, To display raster data, you can try ST_DumpAsPolygons into Arcgis or

Re: [postgis-users] 2.1.6 Released

2015-03-26 Thread Rémi Cura
Of *Rémi Cura *Sent:* Thursday, March 26, 2015 5:33 PM *To:* PostGIS Users Discussion *Subject:* Re: [postgis-users] 2.1.6 Released Hey, if you use the compression of patch and sensible xml schema, you should already have a 1:2 to 1:4 compression of the point size. (compared to binary ply in my

Re: [postgis-users] Need help on basic concepts, I just need really simple calculations

2015-03-22 Thread Rémi Cura
Hey, I would sugger to read a little bit about geographical information https://en.wikipedia.org/wiki/Spatial_reference_system before using PostGIS. The unit depend on the way you measure, which depends on the Spatial Reference System. If you want it is a bit like measuring the temperature in

[postgis-users] Looking for an intern to work on PostGIS topology

2015-03-16 Thread Rémi Cura
Hey dear Lists (apologies for cross post). We are *looking for an intern* (4-6 months) to work on PostGIS topology in our research lab near Paris. We are in a *hurry*. The subject is about facilitating *user editing **of a PostGIS topology* base trough triggers, same for topogeometries, then the

Re: [postgis-users] median center instead of st_centroid

2015-03-12 Thread Rémi Cura
Hey, what you want is extremely easy to get. First add the median function to your database from here https://wiki.postgresql.org/wiki/Aggregate_Median (Now you have access to median(numeric) ) Then, for a table my_table containing points in the geom column --not tested SELECT

Re: [postgis-users] median center instead of st_centroid

2015-03-12 Thread Rémi Cura
De rien lointain cousin du Québec ;-) Rémi-C 2015-03-12 19:43 GMT+01:00 steve.tout...@inspq.qc.ca: Wow merci Remi. That saves me a lot of coding... *Rémi Cura remi.c...@gmail.com remi.c...@gmail.com@lists.osgeo.org http://lists.osgeo.org* Envoyé par : postgis-users-boun

Re: [postgis-users] Quadgrid Recursive SQL Function - Now Available on Github

2015-03-10 Thread Rémi Cura
Most interesting ! I really like the LATERAL, even at the price of postgres =9.3, it is well worth it. I spent a lot of time to efficiently build quad tree over point cloud (plpgsql, then python), and I must say 20 sec for 1 million points is good. Cheers, Rémi-C 2015-03-10 8:54 GMT+01:00 Andre

Re: [postgis-users] SQL syntax question

2015-03-09 Thread Rémi Cura
Hey, this is more a postgres/SQL question. Anyway SELECT a.gid, b.gid, st_shortestline(a.geom,b.geom), ST_Distance(a.geom,b.geom) AS distance FROM test.nfanwood AS a, test.nfanwood AS b WHERE ST_DWithin(a.geom,b.geom,2000) = TRUE The syntax is : SELECT choose what you see as final result

Re: [postgis-users] Line of sight (LOS) Calculation

2015-03-09 Thread Rémi Cura
Very cool solution ! Could you give a better estimate of run time? (example of DEM resolution, time?) Cheers, Rémi-C 2015-03-09 9:45 GMT+01:00 Paolo Cavallini cavall...@faunalia.it: Il 09/03/2015 04:16, Mark Wynter ha scritto: An example of how you can generate Viewsheds in PostGIS via PL/R

Re: [postgis-users] OGC geometry definition

2015-03-06 Thread Rémi Cura
have a look at ISO 19107 as well (if you want more the conceptual model underneath). Martijn On 06-03-15 11:20, Rémi Cura wrote: Hey, Somebody knows where to find the doc about geometry model (__not__ geometry functions )? I tried to look on OGC website but was rapidely lost. Thanks

Re: [postgis-users] Tutorial: Bezier Curves - A More Flexible Alternative to Great Circles

2015-03-05 Thread Rémi Cura
Hey, nice work ! I'm adding this to my personnal toolbox . I'm a little curious because I know you are a R user, why didn't you use R package to compute bezize, there are several? Is this a portability issue? For the interpolation, this can be substantially more difficult if you allow outliers,

Re: [postgis-users] ST_Intersection very slow

2015-03-05 Thread Rémi Cura
point, so the quadgrid knows not only how many points, but which distinct polygons - so ST Intersection only evaluates those we already know to intersect. Cool!! Sent from my iPhone On 5 Mar 2015, at 8:32 pm, Rémi Cura remi.c...@gmail.com wrote

[postgis-users] QGIS plugin to track in PostGIS database ( trigger usage)

2015-02-27 Thread Rémi Cura
Hello Dear List, We are pleased to announce the release of a QGIS plug-in http://remi-c.github.io/interactive_map_tracking/ that has been designed to be used with PostGIS. The first functionality is that it allows multi-user camera extent (in qgis) *tracking*. So when editing the same data,

Re: [postgis-users] TopologyException: geom is invalid

2015-02-26 Thread Rémi Cura
And also ST_IsSimple (that precisely check for self intersection). Cheers, Rémi-C 2015-02-26 8:32 GMT+01:00 BladeOfLight16 bladeofligh...@gmail.com: On Wed, Feb 25, 2015 at 12:14 PM, Joseph Spenner joseph85...@yahoo.com wrote: DBD::Pg::st execute failed: ERROR: Error performing

Re: [postgis-users] ST_Intersection very slow

2015-02-25 Thread Rémi Cura
Where is the data set? Cheers, Rémi-C 2015-02-25 9:18 GMT+01:00 Mark Wynter m...@dimensionaledge.com: I’ll also try and take a look - I’ve just downloaded the dataset in question - I’m keen to see it. Will revert. On 25 Feb 2015, at 6:41 pm, Rémi Cura remi.c...@gmail.com wrote: Damn I'm

Re: [postgis-users] ST_Intersection very slow

2015-02-25 Thread Rémi Cura
Damn I'm publishing a QGIS plugin for POstGIS, I can't write you the fast intersection by casting polygon to points, intersection then casting back to polygon. I'll try to squeeze it somehow. Cheers, Rémi-C 2015-02-25 1:44 GMT+01:00 Mark Wynter m...@dimensionaledge.com: The land cover data

Re: [postgis-users] ST_Intersection very slow

2015-02-24 Thread Rémi Cura
Hey, I highjack this interesting discussion, sorry =) If you have one single massive Polygon (no multi). You can generate a point table (keeping path of course) with ST_DumpPoints. Then you construct an index on this table. Then you perform your Intersection with indexed points, which will be

Re: [postgis-users] operator is not unique: text || geometry

2015-02-20 Thread Rémi Cura
). If you have a specific question I may answer it. Cheers, RémiC 2015-02-18 23:29 GMT+01:00 Miller, Stephan smill...@harris.com: Here is the SQL. Thanks. Steve *From:* Rémi Cura [mailto:remi.c...@gmail.com] *Sent:* Wednesday, February 18, 2015 2:57 PM *To:* Miller, Stephan; PostGIS

Re: [postgis-users] ST_Intersection very slow.

2015-02-19 Thread Rémi Cura
Hey, you could try to not use CASE (so separate the spatial join from the processing, which is easy to parallelize (assuming you have more than one core )). First generate the table with CREATE TABLE psatial_mapping_between_lancover_and_taz AS SELECT row_number() over() as row_id,

Re: [postgis-users] operator is not unique: text || geometry

2015-02-18 Thread Rémi Cura
the r.shape and cleantopo parameters? Sorry to be so dense. Thanks, Steve *From:* Rémi Cura [mailto:remi.c...@gmail.com] *Sent:* Wednesday, February 18, 2015 1:59 PM *To:* Miller, Stephan *Subject:* Re: [postgis-users] operator is not unique: text || geometry As I wrote before

Re: [postgis-users] Getting TopologyExections when trying to node linestrings to create an overlay

2015-02-18 Thread Rémi Cura
else? I suppose I could dump groups into shapefiles or something like that if it's more convenient. On Mon, Feb 9, 2015 at 7:00 AM, Rémi Cura remi.c...@gmail.com wrote: this is a precision related issue, coordinates are way too big and should be translated. I understand what you mean

Re: [postgis-users] Getting TopologyExections when trying to node linestrings to create an overlay

2015-02-18 Thread Rémi Cura
Computing finished successfuly on your data. The change I did is : ST_Polygonize(ST_Node(ST_Collect(geom)) ) It is awfully slow tough (1 hour for all you dataset I think) Cheers, Rémi-C 2015-02-18 13:07 GMT+01:00 Rémi Cura remi.c...@gmail.com: Hey, last chance for you ^^ I successfully

Re: [postgis-users] operator is not unique: text || geometry

2015-02-17 Thread Rémi Cura
Here is the cleaned version, still no good tough. I don't understand what you want to do, I don't have your table structure nor your data, so you will need to work from that. CREATE OR REPLACE FUNCTION hc_check_gaps_in_linear_topology(IN tablename text, IN cleantopo text) RETURNS

Re: [postgis-users] operator is not unique: text || geometry

2015-02-17 Thread Rémi Cura
Hey Stephan, I'm afraid I must say the coding style is not good and dangerous. And I know that the very nature of plpgsql langage (and doc) make it difficult to produce a nice function. AS it is, it is very hard to read it, and any user of your function could potentially inject SQL via your

Re: [postgis-users] Question on optimizing slow geospatial query

2015-02-11 Thread Rémi Cura
Hey, for the following I make the hypothesis that 1. for you trip A-B should be separated from trip B-A. 2. od1.taz.geom are non overlaping polygon (ie your zone are non overlaping) 3. whatever startloc, endloc, there exist a zone overlapping it. Now you querry look like this --compute the

Re: [postgis-users] Hardware requirements for a server

2015-02-11 Thread Rémi Cura
Own setup : dell precision 2*6 cores, 20 go RAM, SSD for index, 7200 HDD for big tables. I do very different stuff with the server : - base for visualisation of classical vector table (Usually few users mostly reading.) - base for automatic road generation (topology + very very complex query)

Re: [postgis-users] EXECUTE CREATE TABLE AS SELECT

2015-02-10 Thread Rémi Cura
' || updatedtablename';' End execute 'INTO '|| updatedtablename ||';' $BODY$ Is this what you had in mind? Thanks, Steve *From:* postgis-users-boun...@lists.osgeo.org [mailto: postgis-users-boun...@lists.osgeo.org] *On Behalf Of *Rémi Cura *Sent:* Tuesday, February 10, 2015 10:47 AM

Re: [postgis-users] Hardware requirements for a server

2015-02-10 Thread Rémi Cura
Hey, nice project =) If you use something like qgis, each user can easily have a dozen connection open to server, so with 10 users, you may need to use something like pgpool. About hardware dimension, it is more a question for postgres list. You may stress that your usage is probably mostly

Re: [postgis-users] Getting TopologyExections when trying to node linestrings to create an overlay

2015-02-09 Thread Rémi Cura
) Cheers, Rémi-C 2015-02-09 13:00 GMT+01:00 Rémi Cura remi.c...@gmail.com: Hey Sandro, this is a precision related issue, coordinates are way too big and should be translated. Cheers, Rémi-C 2015-02-09 12:25 GMT+01:00 Sandro Santilli s...@keybit.net: On Tue, Feb 03, 2015 at 11:28:35AM

Re: [postgis-users] Getting TopologyExections when trying to node linestrings to create an overlay

2015-02-09 Thread Rémi Cura
Hey Sandro, this is a precision related issue, coordinates are way too big and should be translated. Cheers, Rémi-C 2015-02-09 12:25 GMT+01:00 Sandro Santilli s...@keybit.net: On Tue, Feb 03, 2015 at 11:28:35AM -0500, BladeOfLight16 wrote:

Re: [postgis-users] Find out if polygon is circle

2015-02-05 Thread Rémi Cura
Hey, your question is a little bit un-precise. If you try to find circle that have been drawn by a CAD program for instance (perfect circle), you can use ST_LineToCurve(). If you are trying to detect polygons that look like circle (maybe the border is very close to a circle, but overall it is

Re: [postgis-users] English please

2015-02-03 Thread Rémi Cura
and note that my problem is solved? Cheers, Guillaume Le 03/02/2015 13:10, Rémi Cura a écrit : /*french version at the end*/ Ok I think I found the problem : your geometry are not simple, that is in postgis langage, there is no selfintersection. Your lines have tone of selfintersection

Re: [postgis-users] English please (was: Get parallel some route.)

2015-02-01 Thread Rémi Cura
Hey Sandro, glad you come here, I'm running out of ideas. Sometime English is not an option for everybody ;-) We are coming closer to a GEOS or PostGIS bug. So here is the summary, - Using about 250 linestring, trying to use the st_offsetcurve function - lines are simple, valid, snapped to

Re: [postgis-users] Get parallel some route.

2015-01-29 Thread Rémi Cura
)... Merci encore pour votre aide. En espérant que mon problème est une solution. Guillaume. Le 28/01/2015 16:02, Rémi Cura a écrit : /* For the list archive : problem is probably using ST_OffsetCurve with multilinestring instead of linestring.*/ Bonjour, St_OffsetCurve ne fonctionne

Re: [postgis-users] Get parallel some route.

2015-01-28 Thread Rémi Cura
Same, On peut répondre à la question en français, il y en a quelques un sur la mailing list... Rémi-C 2015-01-28 11:44 GMT+01:00 Nicolas Ribot nicolas.ri...@gmail.com: Hi Guillaume, Not sure I understand what you want to achieve. Can you describe it, maybe with an image. (or in french)

Re: [postgis-users] Get parallel some route.

2015-01-28 Thread Rémi Cura
parle pas. Un autre solution serait d'eclater l'itineraire en plusieurs partie simple et de décaler toutes ces partie mais je n'ai pas trouver comment faire pour éclater cet itineraire. Merci de vos réponses et de votre intérêt pour ma question. Guillaume ARNAUD Le 28/01/2015 12:32, Rémi

Re: [postgis-users] Evenly distributing a point set

2015-01-26 Thread Rémi Cura
Hey, I used Nicolas's strategy and it works. You could slightly improving it by some preprocessing on the linestring itself (smoothing or simplifying, depending on your data) Cheers, Rémi-C 2015-01-25 22:32 GMT+01:00 Nicolas Ribot nicolas.ri...@gmail.com: Hello, You could build the linestring

Re: [postgis-users] Evenly distributing a point set

2015-01-26 Thread Rémi Cura
Hey, it is unclear what you want and how your data looks like. For better answer it would be good to have better info. Maybe a screen of your data, some facts, for what usage (admissible error, expected quality ..) etc etc. What you are trying to do (reconstruct a network from sampled pieces) is

Re: [postgis-users] Checking Road Network Topology

2015-01-23 Thread Rémi Cura
For my data I also had to use a tolerance, the 0 tolerance gives errors. Cheers, Rémi-C 2015-01-23 13:04 GMT+01:00 toni hernández t...@sigte.udg.edu: yeah! that's it. thanks. On 23/01/2015 11:34, Sandro Santilli wrote: On Fri, Jan 23, 2015 at 10:46:43AM +0100, toni hernández wrote:

Re: [postgis-users] Checking Road Network Topology

2015-01-22 Thread Rémi Cura
Wow this seems like really impressive work, at a very cool scale! It is more or less the kind of tool I dreamt to have. Processing a 1.2 million topology is really not easy, I wonder if CGAL implementation is multiprocessed. Cheers, Rémi-C 2015-01-22 8:00 GMT+01:00 Paolo Cavallini

Re: [postgis-users] Checking Road Network Topology

2015-01-21 Thread Rémi Cura
Hey, we previously discussed this matter of cleaning topology. Postgis topology is about iso topology storage and use, not cleaning. There are dedicated and powerfull tools for this (like Grass http://grass.osgeo.org/grass70/manuals/v.clean.html). Cheers, Rémi-C 2015-01-20 21:26 GMT+01:00 Sandro

Re: [postgis-users] Checking Road Network Topology

2015-01-21 Thread Rémi Cura
smill...@harris.com: Thanks. I will look into GRASS. Can you send a pointer to the blog where this topic was discussed? Thanks, Steve *From:* Rémi Cura [mailto:remi.c...@gmail.com] *Sent:* Wednesday, January 21, 2015 3:11 AM *To:* PostGIS Users Discussion; Miller, Stephan

Re: [postgis-users] Why won’t my SELECT query use the INDEX?

2014-12-16 Thread Rémi Cura
Hey, no index can come from 2 problems : - your querry can't use the index - your querry could use the index but the planner thinks it's faster to do sequential scan. You can discriminate between the 2 avoiding explicitly sequential scan : `SET enable_seqscan TO FALSE` (don't forget to turn

Re: [postgis-users] Why won’t my SELECT query use the INDEX?

2014-12-16 Thread Rémi Cura
FROM my_table WHERE st_translate(geom,0) ST_GeomFromText('POLYGON ((892267.1937422 6148208.34251139, 892500.497129949 6148208.34251139, 892500.497129949 6148009.40012468, 892267.1937422 6148009.40012468, 892267.1937422 6148208.34251139))',0) Cheers, Rémi-C 2014-12-16 17:43 GMT+01:00 Rémi Cura

  1   2   3   4   >