Re: [postgis-users] pointcloud : change pcid ?
Yep. For the downgrading I tried it a while ago for a subset of the same schema, https://github.com/Remi-C/pointcloud/blob/master/lib/pc_api.h#L445 The idea was that usually we don't need all dimensions, particularly when working on the geometry. So I wrote a couple of functions to allow a pc_explodes with only a subset of dimensions. The condition was the dimension should have the same name. I guess non mapped dimensions could be filled with O or null or Nan? Cheers, Rémi-C 2014-10-31 1:04 GMT+01:00 Paul Ramsey pram...@cleverelephant.ca: Correct, I was thinking more PC_Transform(pcpatch, pcid), which would look for common dimension names and map between them by default, or could maybe accept a mapping (dim-dim) to control the conversion. But yes. Danger I suppose in downgrading data (pushing a 4 byte into 2 byte) but that could be left to users to avoid or not on their own (emit warnings on downgrades maybe). On Wed, Oct 29, 2014 at 4:54 AM, Rémi Cura remi.c...@gmail.com wrote: I'm sorry I think I was unclear. I don't want to acces point, I just want to change the pcid of a patch. For the moment it seems to imply a complete destruction/reconstruction of a new, which is really really not efficient. Basically in this case I would like a function PC_SetPCID(pcpatch) I understand that such function is very hard to create in the genral case, because you would have to put mappings between attributes. Cheers. Rémi-C 2014-10-28 19:08 GMT+01:00 Stephen V. Mather s...@clevelandmetroparks.com : Ah. Yes, I think if you are accessing a point within a patch, you have to unpack the patch. It's one of those tradeoffs... [image: http://sig.cmparks.net/cmp-ms-90x122.png] Stephen V. Mather GIS Manager (216) 635-3243 (Work) clevelandmetroparks.com http://www.clemetparks.com -- *From:* postgis-users-boun...@lists.osgeo.org postgis-users-boun...@lists.osgeo.org on behalf of Rémi Cura remi.c...@gmail.com *Sent:* Tuesday, October 28, 2014 1:33 PM *To:* PostGIS Users Discussion *Subject:* Re: [postgis-users] pointcloud : change pcid ? Now the only solution I found is to break a patch into point, then break point into attributes, then construct a new point with correct pcid and attributes, then construct a new patch ! Cheers, Rémi-C 2014-10-28 17:31 GMT+01:00 Stephen V. Mather s...@clevelandmetroparks.com: How do you mean? What are you doing now? [image: http://sig.cmparks.net/cmp-ms-90x122.png] Stephen V. Mather GIS Manager (216) 635-3243 (Work) clevelandmetroparks.com http://www.clemetparks.com -- *From:* postgis-users-boun...@lists.osgeo.org postgis-users-boun...@lists.osgeo.org on behalf of Rémi Cura remi.c...@gmail.com *Sent:* Tuesday, October 28, 2014 11:01 AM *To:* PostGIS Users Discussion *Subject:* [postgis-users] pointcloud : change pcid ? Hey, any pointcloud users has an idea about changing the pcid of a patch without breaking it into pieces? Cheers, Rémi-C ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
[postgis-users] Difference between Geometry and BLOB in Postgis
I am working through some postgis stuff for a Drupal module, and noticed that the geometry storage in Drupal is bytea (because it tends to be mysql-centric?). What is the difference, i.e., advantage offered by the PostGIS custom type geometry? Thanks, /r/b -- -- Robert W. Burgholzer 'Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.' - Charles Mingus Athletics: http://athleticalgorithm.wordpress.com/ Science: http://robertwb.wordpress.com/ Wine: http://reesvineyard.wordpress.com/ ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
[postgis-users] multiple rasters in same table?
Is there any chance to load multiple rasters in the same table? Raffaele -- « Nunc est bibendum, nunc pede libero pulsanda tellus » ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] multiple rasters in same table?
2014-10-31 15:08 GMT+01:00 Raffaele Morelli raffaele.more...@gmail.com: Is there any chance to load multiple rasters in the same table? Raffaele Yes. Similarly to vector, a raster layer in PostGIS is made of a pair: table and column, not just a table. Best regards, -- Mateusz Łoskot, http://mateusz.loskot.net ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
[postgis-users] Topology: cannot delete slivers (or gaps)
Hi! I'm am turning to you all hoping you'll have some tricks to help with this problem: I created a topology for 2290 polygons and populated a topogeom column using these commands: SELECT topology.CreateTopology('de_20k_topo', find_srid('syshiera', 'de_20k', 'geom_32198'), 1e-4); SELECT topology.AddTopoGeometryColumn('de_20k_topo', 'syshiera', 'de_20k', 'topogeom', 'MULTIPOLYGON'); DO $$DECLARE r record; BEGIN FOR r IN SELECT * FROM syshiera.de_20k LOOP BEGIN UPDATE syshiera.de_20k SET topogeom = toTopoGeom(geom_32198, 'de_20k_topo', 1, 1e-4) WHERE gid = r.gid; EXCEPTION WHEN OTHERS THEN RAISE WARNING 'Loading of record % failed: %', r.gid, SQLERRM; END; END LOOP; END$$; -- For testing: SELECT topology.CopyTopology('de_20k_topo', 'de_20k_topo_tests'); I need to fix 1) extra nodes along edges that are not at an intersection and 2) sliver polygons. For cases in 1, I was successful using 'ST_NewEdgeHeal' and a plPgsql script. For cases in 2, I can remove some slivers with 'ST_RemEdgeModFace' but some of them I just can't delete: I get either: ERROR: TopoGeom 1123 in layer 1 (de_20k_topo_tests.LAYER1.) cannot be represented healing faces 1514 and 1502 Or, when trying with remove a node with 'topology.ST_NewEdgeHeal': ERROR: SQL/MM Spatial exception - other edges connected (3912) In this particular example, two edges are connected two the same two nodes, similar to what was discussed here: http://postgis.17.x6.nabble.com/PostGIS-1955-Exception-when-2-edges-passed-to-ST-ModEdgeHeal-that-are-attached-to-the-same-2-nodes-td4999383.html But according to that discussion thread, this was fixed in an earlier version (I'm using topology version 2.1.3). Maybe my problem is different but I'll need your help to get it sorted. Here's an example showing the small face (1502) I want remove: https://dl.dropboxusercontent.com/u/5196336/example1.bmp Thanks for your help! ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] Difference between Geometry and BLOB in Postgis
On Fri, Oct 31, 2014 at 08:47:59AM -0400, Robert Burgholzer wrote: I am working through some postgis stuff for a Drupal module, and noticed that the geometry storage in Drupal is bytea (because it tends to be mysql-centric?). What is the difference, i.e., advantage offered by the PostGIS custom type geometry? Advantages are those of having typed data. Functions can behave differently based on the data type, you can have type-specific statistical analyzers and operators, you know exactly how to interpret the data... --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] Difference between Geometry and BLOB in Postgis
Thanks for the response - I was thinking that may be the case. I suppose I should ask if PostGIS has anything that would make it behave badly when called on geometries stored as plain old blob's? On Fri, Oct 31, 2014 at 12:23 PM, Sandro Santilli s...@keybit.net wrote: On Fri, Oct 31, 2014 at 08:47:59AM -0400, Robert Burgholzer wrote: I am working through some postgis stuff for a Drupal module, and noticed that the geometry storage in Drupal is bytea (because it tends to be mysql-centric?). What is the difference, i.e., advantage offered by the PostGIS custom type geometry? Advantages are those of having typed data. Functions can behave differently based on the data type, you can have type-specific statistical analyzers and operators, you know exactly how to interpret the data... --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users -- -- Robert W. Burgholzer 'Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.' - Charles Mingus Athletics: http://athleticalgorithm.wordpress.com/ Science: http://robertwb.wordpress.com/ Wine: http://reesvineyard.wordpress.com/ ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] Topology: cannot delete slivers (or gaps)
On Fri, Oct 31, 2014 at 10:17:48AM -0400, Guillaume Drolet wrote: I created a topology for 2290 polygons and populated a topogeom column [...] I need to fix 1) extra nodes along edges that are not at an intersection and 2) sliver polygons. [...] For cases in 2, I can remove some slivers with 'ST_RemEdgeModFace' but some of them I just can't delete: I get either: ERROR: TopoGeom 1123 in layer 1 (de_20k_topo_tests.LAYER1.) cannot be represented healing faces 1514 and 1502 This error means that a TopoGeometry object exists (with id=1123) that's defined as containing only one of the faces separated by the edge you're trying to remove. The fix here would be to find faces that take part in the composition of multiple TopoGeometry objects and those NOT taking part in the composition of any TopoGeometry object. I've seen GRASS GUIs referring to those 2 classes as polygon0 and polygon2, enough that I've been thinking it could be useful to have them shown as layers in the QGIS viewer for PostGIS Topology. You should be able to extract those faces with a query to the relation and the layers tables. So basically you first have to fix the TopoGeometry objects and then can safely drop the no-more-needed edges. Or, when trying with remove a node with 'topology.ST_NewEdgeHeal': ERROR: SQL/MM Spatial exception - other edges connected (3912) In this particular example, two edges are connected two the same two nodes, similar to what was discussed here: http://postgis.17.x6.nabble.com/PostGIS-1955-Exception-when-2-edges-passed-to-ST-ModEdgeHeal-that-are-attached-to-the-same-2-nodes-td4999383.html But according to that discussion thread, this was fixed in an earlier version (I'm using topology version 2.1.3). Maybe my problem is different but I'll need your help to get it sorted. Here's an example showing the small face (1502) I want remove: https://dl.dropboxusercontent.com/u/5196336/example1.bmp Which edge ids did you pass to ST_NewEdgeHeal ? Is the topology in a good state according to topology.ValidateTopology ? --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] Difference between Geometry and BLOB in Postgis
On Fri, Oct 31, 2014 at 12:26:44PM -0400, Robert Burgholzer wrote: Thanks for the response - I was thinking that may be the case. I suppose I should ask if PostGIS has anything that would make it behave badly when called on geometries stored as plain old blob's? PostgreSQL would only call PostGIS functions taking Geometry if you pass them what PostgreSQL belives being Geometry objects. At which level are you acting here ? At SQL level a bytea could be converted to a geometry object implicitly using the bytea::geometry cast, which assumes the bytea is in EWKB format. --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
[postgis-users] Import gpx files into Postgis db (windows)?
Dear all, I'm working with windows 8 postgis 2.1. I have several gps (gpx) files. I would like to import directly those gpx files into my postgis database. What would be the easiest way? In advance, thank you to throw light for me. Regards. -- View this message in context: http://postgis.17.x6.nabble.com/Import-gpx-files-into-Postgis-db-windows-tp5007255.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] Difference between Geometry and BLOB in Postgis
Working at the module level in Drupal, creating queries with spatial operators for Views. Basically, Drupal's GeoField module stores geoms as bytea, which the PostGIS functions seem to handle quite nicely without a cast. Ultimately, I will push to have the database column in GeoField created as a Geometry type in order to be certain not to cause problems with PostGIS functions. But for the moment, I am trying to assess the likelihood that some PostGIS function somewhere actually relies upon something that's baked into the Geometry type. I am focused on basic relationship operators like contains, within, overlaps and intersects. /r/b -- -- Robert W. Burgholzer 'Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.' - Charles Mingus Athletics: http://athleticalgorithm.wordpress.com/ Science: http://robertwb.wordpress.com/ Wine: http://reesvineyard.wordpress.com/ ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] Topology: cannot delete slivers (or gaps)
Hi Sandro, Thanks for your help! topology.ValidateTopology gives this: error id1 id2 character varying integer integer -- --- face has no rings 1831 If I calculate the area of face 1831 (st_area(st_getfacegeometry('de_20k_topo', face_id))), I get a NULL value. I also find I have some 650 of these slivers with an area below 75 m2 while most of my correct polygons have an area above 300 000 000 m2. Re the edges passed to ST_NewEdgeHeal, in the example I sent it was edges 3908 and 3909. If you think about something else that could be problematic, let me know. Meanwhile I'll dig into the approach you suggested in your reply (i.e. fixing TopoGeometry objects). Thanks! PS. Forgot to mention that in the first topology I had created, I used a tolerance of 2.0 meters instead of 1e-4 meters. While that yielded much less slivers, I was getting way more of those nodes not located at an intersection. What is best? -- View this message in context: http://postgis.17.x6.nabble.com/Topology-cannot-delete-slivers-or-gaps-tp5007250p5007257.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] Difference between Geometry and BLOB in Postgis
OK cool. So if I understand correctly, it seems that there may be no immediate danger to the use of bytea, at the very least it is requiring an implicit cast which may decrease performance. Thanks for all the insight on this... will be rolling forward with an eye towards migrating to geometry type in some future release. On Fri, Oct 31, 2014 at 4:32 PM, Sandro Santilli s...@keybit.net wrote: On Fri, Oct 31, 2014 at 01:49:59PM -0400, Robert Burgholzer wrote: Working at the module level in Drupal, creating queries with spatial operators for Views. Basically, Drupal's GeoField module stores geoms as bytea, which the PostGIS functions seem to handle quite nicely without a cast. The cast is there, only it's implicit. When you call a function, PostgreSQL looks for candidates. Example: you call ST_Length(bytea), PostgreSQL finds an ST_Length(geometry) and see if a cast from geometry to bytea exists and is tagged as allowed to be implicit, it finds it and calls it. You can see this yourself by creating your own ST_Length(bytea) function, in which case it'll be called instead of ST_Length(geometry). In case multiple candidates exist with the same number of implicit casts required, PostgreSQL will raise an error. --strk; () Free GIS Flash consultant/developer /\ http://strk.keybit.net/services.html ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users -- -- Robert W. Burgholzer 'Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.' - Charles Mingus Athletics: http://athleticalgorithm.wordpress.com/ Science: http://robertwb.wordpress.com/ Wine: http://reesvineyard.wordpress.com/ ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users