Re: [postgis-users] polyhedral surface import from common 3D formats

2014-08-01 Thread j.rolland
Hi Giovani,
You give an idea for a translation tool, i begin a development in C# for
Wiindows, i am going to implement STL, PLY and OBJ format to WKT
POLYHEDRALSURFACE Geometry for a PostGIS Database.
Do you have some samples files for these formats?

I have a blog too, you can have a look here : 
http://ageoguy.blogspot.com/

Regards,
Jérôme



--
View this message in context: 
http://postgis.17.x6.nabble.com/polyhedral-surface-import-from-common-3D-formats-tp5006777p5006788.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

[postgis-users] Sorry for simple question!

2014-08-01 Thread Darrel Maddy
Dear all,

I am just reacquainting myself with postgres and postgis and trying to decide 
how best to store the output from my model (large matrices stored in gtiff 
format).  I really want to store multiple rasters in one table but when I try 
to visualise these in QGIS (via an sql extract in dbmanager using import to new 
layer) nothing happens. I can add one raster per table to the canvas but I do 
not want thousands of tables.   Will the dbmanager sql add layer work with rast 
as a geometry?

I suspect this is simple, but it eludes me at present.

Thanks in anticipation of your help.

Darrel
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

[postgis-users] Hex grid value interpolation

2014-08-01 Thread Dave Barter
I have a table of tessellated hexagons that I created as a hex binning grid to 
cover an area.

I've then overlaid a point set to give some of the hexagons a value. The shapes 
with value 0 have no value and I'd like to interpolate these from the values 
of the neighbours (ie. as per Kriging or other algorithm). How can I accomplish 
this in postgis given my table looks like:-

hex_grid_data
(
 gid SERIAL,
 wkb_geometry (geometry),
 value INTEGER
)


___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Re: [postgis-users] PG 2.0 to add table with heterogeneous geometry in QGIS

2014-08-01 Thread Preuß , Sylvia
Hello Alexandre,
CREATE TABLE myschema. mytable
( the_geom geometry(MultiPolygon,25832)
)
INSERT INTO myschema. mytable (the_geom) 
VALUES(st_multi('010320E864010045000…….. 18415D607F5459915541'));

This is what I was looking for! Thank you very much!! Sylvia
From: postgis-users-boun...@lists.osgeo.org 
[mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of Alexandre Neto
Sent: Friday, August 01, 2014 1:52 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] PG 2.0 to add table with heterogeneous geometry in 
QGIS

Hello sylvia,

If you are using QGIS to add polygons that should not be a problem.
On the other hand, if you are inserting rows using INSERT, then you should use 
St_multi() function around your the_geom column:

st_multi(the_geom)

This will transform your polygon into a single part multipolygon.

Hope it helps,

Alexandre Neto

2014-08-01 12:03 GMT+01:00 Preuß, Sylvia 
sylvia.pre...@obk.demailto:sylvia.pre...@obk.de:
Hello Alexandre,

thanks for your hint, but I can‘ t put Polygons into a Multipolygon - table. 
When I try to insert the records into the table I get the message:

FEHLER:  Geometry type (Polygon) does not match column type (MultiPolygon)


** Fehler **

FEHLER: Geometry type (Polygon) does not match column type (MultiPolygon)
SQL Status:22023
PostGIS version:
2.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
Postgres version:
PostgreSQL 9.2.8, compiled by Visual C++ build 1600, 64-bit
QGIS 2.4.0
Sylvia

From: 
postgis-users-boun...@lists.osgeo.orgmailto:postgis-users-boun...@lists.osgeo.org
 
[mailto:postgis-users-boun...@lists.osgeo.orgmailto:postgis-users-boun...@lists.osgeo.org]
 On Behalf Of Alexandre Neto
Sent: Thursday, July 31, 2014 7:58 PM

To: PostGIS Users Discussion
Subject: Re: [postgis-users] PG 2.0 to add table with heterogeneous geometry in 
QGIS


you can put polygons inside a multipolygon geometry. I would not even call it 
heterogeneous.

You just need to use:
the_geom geometry (multipolygon,25823).

Hope it helps,

Alexandre Neto
Em 31/07/2014 12:46, Preuß, Sylvia 
sylvia.pre...@obk.demailto:sylvia.pre...@obk.de escreveu:
Hi,

I tried with and without checking this option. I get an attribut-table but no 
geometry. It’s just like csv.
Sylvia

From: 
postgis-users-boun...@lists.osgeo.orgmailto:postgis-users-boun...@lists.osgeo.org
 
[mailto:postgis-users-boun...@lists.osgeo.orgmailto:postgis-users-boun...@lists.osgeo.org]
 On Behalf Of Åsmund Tokheim
Sent: Thursday, July 31, 2014 12:25 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] PG 2.0 to add table with heterogeneous geometry 
in QGIS

Hi

When you create/edit a postgis-connection in qgis, there should be an checkbox 
named something like Don't resolve type of unrestricted columns. Your table 
will not be listed if this option is checked.

Åsmund

2014-07-31 11:29 GMT+02:00 Preuß, Sylvia 
sylvia.pre...@obk.demailto:sylvia.pre...@obk.de:
Hello list,
 
I have heterogeneous geometry (Polygon and MultiPolygon ) in one single table.

CREATE TABLE myschema.mytable
(  gid serial NOT NULL,
the_geom geometry(geometry,25832),
CONSTRAINT pkey_mytable  PRIMARY KEY (gid)
);
 
Unfortunately I can’t add this as a PostGIS –Layer in QGIS. The geometry is 
not found.

Same behaviour with
CREATE TABLE myschema. mytable
(
 gid serial NOT NULL,
  the_geom geometry,
CONSTRAINT pkey_ mytable PRIMARY KEY (gid)
);

I can’t do it like this:
 CREATE TABLE myschema. mytable
(  gid serial NOT NULL,
  the_geom geometry(Polygon OR MultiPolygon,25832),
CONSTRAINT pkey_ mytable PRIMARY KEY (gid)
)

PostGIS version:
2.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
Postgres version:
PostgreSQL 9.2.8, compiled by Visual C++ build 1600, 64-bit
QGIS 2.4.0

Sylvia


___
postgis-users mailing list
postgis-users@lists.osgeo.orgmailto:postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users



Der E-Mail-Dienst des Oberbergischen Kreises dient ausschließlich der 
dienstlichen Kommunikation.
Senden Sie deshalb keine E-Mails privaten Inhalts an E-Mail-Adressen des 
Oberbergischen Kreises.
Es wird darauf hingewiesen, dass neben der Person, an die Ihre E-Mail gerichtet 
ist, auch deren Vertretung im Amt einen unmittelbaren Zugriff auf Ihre 
Nachricht hat. Für Berufsgeheimnisträger und besondere Funktionsträger gelten 
abweichende Regelungen.
Es wird außerdem darauf hingewiesen, dass die Kommunikation per E-Mail ohne 
Authentifizierung und Verschlüsselung unsicher ist, da für unberechtigte Dritte 
grundsätzlich die Möglichkeit der Kenntnisnahme und Manipulation besteht.
Es wird deshalb keine Verantwortung für den Inhalt dieser Nachricht übernommen, 
da eine Manipulation nicht ausgeschlossen werden kann.
Obwohl alle angemessenen Vorkehrungen getroffen wurden, um sicherzustellen, 
dass Anlagen dieser E-Mail virusgeprüft sind, wird empfohlen, anhängende 
Dateien vor dem Öffnen durch 

Re: [postgis-users] Sorry for simple question!

2014-08-01 Thread David Haynes
You can place rasters into a single raster using ST_BAND. If you are
familiar with rasters this will make a multispectral raster. I don't
believe there is a limit to the bands as I have added over 50. To make the
multispectral raster your other rasters (matrices) will need to be the same
cell size and alignment.

You might try http://www.gdal.org/gdal_merge.html (using the -separate)

This will create a 2 banded raster in postgis
ST_AddBand(ST_MakeEmptyraster(layers.modis_rast),ARRAY[layers.modis_rast,
layers.stack_rast]) as rast


On Fri, Aug 1, 2014 at 6:42 AM, Darrel Maddy darrel.ma...@newcastle.ac.uk
wrote:

  Dear all,



 I am just reacquainting myself with postgres and postgis and trying to
 decide how best to store the output from my model (large matrices stored in
 gtiff format).  I really want to store multiple rasters in one table but
 when I try to visualise these in QGIS (via an sql extract in dbmanager
 using import to new layer) nothing happens. I can add one raster per table
 to the canvas but I do not want thousands of tables.   Will the dbmanager
 sql add layer work with rast as a geometry?



 I suspect this is simple, but it eludes me at present.



 Thanks in anticipation of your help.



 Darrel

 ___
 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

Re: [postgis-users] Hex grid value interpolation

2014-08-01 Thread Rémi Cura
The answer may depend on the coverage of points you have.

1.) full postgis
If you have a lot of points (meaning few hex without data), you can simply
try to give the 0 hex a value following a function of the value of the
neighbours.

For instance, take the N nearest neighbour (called NN) that have a value!=0
along with there distance to the 0 hex, then update the 0 hex with average
value of NN weighted with the distance.

2.) Postgis+PL/R
If you have very few point it should be easier to use PL/R to perform
krigging on your point, thus giving you
_ a 2D grid with value for each cell. Then you transfer the value from grid
to hex by simple intersection.
_a mathematical function that for a given X,Y return a value. You just have
to evaluate it for every hex.
(the krigging output depends on what you uses in R)

3.)Postgis+Grass (which must be binded to R)
grass gives access to kriging methods. This allow you to avoid installing
pl/R

Cheers,
Rémi-C


2014-08-01 14:26 GMT+02:00 Dave Barter dave.bar...@gmail.com:

 I have a table of tessellated hexagons that I created as a hex binning
 grid to cover an area.

 I've then overlaid a point set to give some of the hexagons a value. The
 shapes with value 0 have no value and I'd like to interpolate these from
 the values of the neighbours (ie. as per Kriging or other algorithm). How
 can I accomplish this in postgis given my table looks like:-

 hex_grid_data
 (
  gid SERIAL,
  wkb_geometry (geometry),
  value INTEGER
 )




 ___
 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

Re: [postgis-users] Sorry for simple question!

2014-08-01 Thread Darrel Maddy
Thanks David, I will explore using the bands to store multiple rasters later. 
For now I am just trying to see how I can visualise one raster (stored in one 
row of a multi-raster i.e. multiple row, table).  I assume I will have the same 
problem with a multiband raster i.e. selecting only one band to visualise in 
QGIS.  As I need to perform calculations using either individual rows or bands, 
I need to resolve this.

I am convinced this is simple but the brain cells are not working well today.

Thanks

Darrel






From: postgis-users-boun...@lists.osgeo.org 
[mailto:postgis-users-boun...@lists.osgeo.org] On Behalf Of David Haynes
Sent: 01 August 2014 13:51
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Sorry for simple question!

You can place rasters into a single raster using ST_BAND. If you are familiar 
with rasters this will make a multispectral raster. I don't believe there is a 
limit to the bands as I have added over 50. To make the multispectral raster 
your other rasters (matrices) will need to be the same cell size and alignment.

You might try http://www.gdal.org/gdal_merge.html (using the -separate)

This will create a 2 banded raster in postgis
ST_AddBand(ST_MakeEmptyraster(layers.modis_rast),ARRAY[layers.modis_rast, 
layers.stack_rast]) as rast

On Fri, Aug 1, 2014 at 6:42 AM, Darrel Maddy 
darrel.ma...@newcastle.ac.ukmailto:darrel.ma...@newcastle.ac.uk wrote:
Dear all,

I am just reacquainting myself with postgres and postgis and trying to decide 
how best to store the output from my model (large matrices stored in gtiff 
format).  I really want to store multiple rasters in one table but when I try 
to visualise these in QGIS (via an sql extract in dbmanager using import to new 
layer) nothing happens. I can add one raster per table to the canvas but I do 
not want thousands of tables.   Will the dbmanager sql add layer work with rast 
as a geometry?

I suspect this is simple, but it eludes me at present.

Thanks in anticipation of your help.

Darrel

___
postgis-users mailing list
postgis-users@lists.osgeo.orgmailto: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