dandrigo | 31 Oct 18:32 2014

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.
Guillaume Drolet | 31 Oct 15:17 2014
Picon

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');

(Continue reading)

Raffaele Morelli | 31 Oct 15:08 2014
Picon

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 »
Robert Burgholzer | 31 Oct 13:47 2014
Picon

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
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Christopher Mutel | 30 Oct 11:15 2014
Picon

Re: Union of topologies (request for comment)

After some work, I came up with the following, which is probably ugly
for those who actually know SQL; but it seems to work, and is quicker
and makes me feel safer than casting to geometry and back:

CREATE OR REPLACE FUNCTION PolygonTopoUnion(topo varchar, layer int,
topo1 topogeometry, topo2 topogeometry)
RETURNS topogeometry as $$
  SELECT CreateTopoGeom(topo, 3, layer, TopoElementArray_Agg(t2.element)) from (
      select distinct element from (
          (select GetTopoGeomElements(topo1) as element) union
          (select GetTopoGeomElements(topo2) as element)
      ) as t1
      order by t1.element  -- Not really necessary, but helpful in
testing correctness
  ) as t2
$$ language 'sql' volatile;

Note that this only applies to [multi]polygons (type 3), as I am
already at the limit of my capabilities.

I would appreciate any feedback or criticism.

Yours,
-Chris

On 13 October 2014 18:29, Christopher Mutel <cmutel <at> gmail.com> wrote:
> Dear all-
>
> Is there a way to create a new topology geometry as the union of two
> existing topology geometries without casting to a normal geometry and
> back? I have tried to write queries merging two TopoElementArrays, and
> then use CreateTopoGeom, but so far without success.
>
> Any help would be greatly appreciated.
>
> Yours,
> Chris
>
> --
> ############################
> Chris Mutel
> Technology Assessment Group, LEA
> Paul Scherrer Institut
> OHSA D22
> 5232 Villigen PSI
> Switzerland
> http://chris.mutel.org
> Telefon: +41 56 310 5787
> ############################

--

-- 
############################
Chris Mutel
Technology Assessment Group, LEA
Paul Scherrer Institut
OHSA D22
5232 Villigen PSI
Switzerland
http://chris.mutel.org
Telefon: +41 56 310 5787
############################
Chrystel Losier | 29 Oct 20:41 2014

(no subject)

I am fairly new to PostGIS and need to append data from a shp to an already existing table in PostGIS. All the columns from the shp and the table are the same, except that the shp does not already contain the geometry column and the primary key column. I am using the following command line to append the data :

 

"C:\Program Files\PostgreSQL\9.3\bin\shp2pgsql.exe"  -g the_geom -W latin1 -s 900913 -a peche_gue_final_projeter.shp corpo.peche_gue  | "C:\Program Files\PostgreSQL\9.3\bin\psql.exe" -h demo.spatialytics.com -d zec_quebec -U jlabelle –q

 

I get the following error message :

 

Error : duplicate key value violates unique constraint « peche_gue_pkey »

Details : Key « id_p_gue » = « 1 » already exists.

 

The table in PostGIS to which I want to append data already has a primary key column : . « id_p_gue » which is in serial.

 

Any ideas how to deal with this problem?

 

Thanks!

_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Francisco D. Salas Rosette | 29 Oct 19:52 2014
Picon

Add my View to geometry_columns in postgis 2.x

Hi,

In postgis 1.5 I have to add my View in the geometry_columns table in public scheme , for load in GVSig, QGis, etc. 

Now in postgis 2.x  I see that exist the geometry_columns, but is a View. How or Where  I can add my View to can load in some GIS. 

  

Regards, 

Francisco 


----------------------------------------------------------------------------------------------------
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Mark Volz | 28 Oct 21:58 2014
Picon
Picon

Getting Started with PostGIS on Windows: Request for documentation review.

Hello,

 

I would like a peer review of some documentation that I put together that covers how to get started with PostGIS on Windows.  The instructions that I have work, but I do not know if they are correct, or secure.  The documentation is located at:  http://geomoose.lyonco.org/PostGIS_New_Documentation.docx. I am putting this documentation together so that I have more of a step by step instruction set that will allow myself or other people the ability to use PostGIS as a backbone to share our GIS data in an organization to ArcView, AutoCAD Map, MapServer, and QGIS users. 

 

Some of the concerns that I have are:

·         Do I have the permissions set up correct?

·         In the past I was able to preview data in ArcCatalog. I cannot replicate the steps to allow previewing in Arc Catalog.    Am I missing something?

·         I cannot view the default permissions for user groups in PGAdmin III in Windows.  Is there any reason why?  Note:  I was able to work around the issue by running SQL.

 

Thank You for help.

 

 

Sincerely,

Mark Volz, GISP

 

 

_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Rémi Cura | 28 Oct 16:01 2014
Picon

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 <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Jochen Albrecht | 24 Oct 06:32 2014
Picon

Replicating ArcGIS relationship classes in PostGIS


I am working on behalf of a small non-profit that has so far used ArcGIS but is interested in moving open source. What kept them from making the move so far is that they are heavy users of relationship classes. The only discussion (inconclusive) that I could find was initiated by Lee Hachadoorian in 2008. Lots has changed since and I am wondering whether anybody has actually done this (implementing relationship classes in PostGIS). For example, back then, Lee suggested a trial-and-error approach to understand the encoding of relationship class tables. Have we gotten any further on this front? I am surprised that GIS Stack Exchange has no mentioning of this at all (assuming the search tools work).
We are using relationship classes for 1:many and many:many relationships. This is not a problem for PostGIS; I just don't know how to migrate the geodatabase keeping those relationships intact.
Cheers,
     Jochen
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Rémi Cura | 23 Oct 15:33 2014
Picon

Oriented BBox Efficient computing?

Hey list,
somebody has a good idea about how efficiently computing an approximate oriented bbox for a polygon ?

The simplest approaches I can think of are
 - iteratively rotate the geom by few degrees, take the envelop. Keep ration where envelope is min
 - using Principal Components Analysis  : extract points regularly spaced on border of object,  compute PCA .

Thanks,
Cheers,
Rémi-C
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Gmane