Adrien ANDRÉ | 15 Apr 22:19 2014
Picon

Raster "zonal histogram"

Hi list,

i have a polygon table named "common.parcel" (3432 records).
and a 11038x13438 pixels raster table "resource.zones" (100x100 tiled)
with the following values:
0: wetland;
1: strong slope;
2: workable surface.

As a "zonal histogram", i'd like to get this kind of result:

 parcel_gid  | 0   | 1    | 2
-------------+-----+------+---
        2048 | 972 | 2428 | 0

I began with

SELECT gid, (c.counts).*
FROM
  (
    SELECT
      p.gid,
      ST_ValueCount(
        ST_Union(ST_Clip(e.rast, 1, p.geom, TRUE)),
        1,
        TRUE,
        ARRAY[0, 1, 2]
      ) AS counts
    FROM resource.zones e
      JOIN common.parcel p ON ST_Intersects(e.rast, p.geom)
(Continue reading)

Marcello Benigno | 15 Apr 14:42 2014
Picon

Error in displaying PostGIS raster layers on Mac

Hi all,

I have on my mac (Mavericks OS) Mapserver 6.2.1 and PostGIS 2.1.2 installed via homebrew and my version of GDAL is 1.10.1_1. Apparently everything works fine ...

When I try to display a raster layer from PostGIS, got the following message:

msDrawMap(): Image handling error. Failed to draw layer named 'srtm'. msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing file 'PG: dbname=raster_test host=localhost user=gis password=123 port=5432 mode=2 schema=public table=srtm' for layer 'srtm'.


Here is my mapfile layer:

LAYER
    NAME "srtm"
    TYPE RASTER
    STATUS DEFAULT
    DATA "PG: dbname=raster_test host=localhost user=gis password=123 port=5432 mode=2 schema=public table=srtm"
    PROCESSING "NODATA=0"
    PROCESSING "SCALE=AUTO"

    METADATA
      "ows_title" "srtm"
    END # METADATA

    PROJECTION
      "init=epsg:4326"
    END # PROJECTION

  END # LAYER


Could anyone suggest a solution? I think I should reinstall PostGIS and mapserver, enabling some flags to PostGIS support GDAL (?), but do not know how to do.

thanks in advance
,

PS. Sorry for the first email without title =/
--
Marcello Benigno B. de Barros Filho
Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
Mestre em Ciências Geodésicas e Tecnologias da Geoinformação - UFPE
Doutorando em Tecnologia Ambiental e Recursos Hídricos - UFPE
http://profmarcello.blogspot.com
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Marcello Benigno | 15 Apr 14:40 2014
Picon

(no subject)

Hi all,

I have on my mac (Mavericks OS) Mapserver 6.2.1 and PostGIS 2.1.2 installed via homebrew and my version of GDAL is 1.10.1_1. Apparently everything works fine ...

When I try to display a raster layer from PostGIS, got the following message:

msDrawMap(): Image handling error. Failed to draw layer named 'srtm'. msDrawRasterLayerLow(): Unable to access file. Corrupt, empty or missing file 'PG: dbname=raster_test host=localhost user=gis password=123 port=5432 mode=2 schema=public table=srtm' for layer 'srtm'.


Here is my mapfile layer:

LAYER
    NAME "srtm"
    TYPE RASTER
    STATUS DEFAULT
    DATA "PG: dbname=raster_test host=localhost user=gis password=123 port=5432 mode=2 schema=public table=srtm"
    PROCESSING "NODATA=0"
    PROCESSING "SCALE=AUTO"

    METADATA
      "ows_title" "srtm"
    END # METADATA

    PROJECTION
      "init=epsg:4326"
    END # PROJECTION

  END # LAYER


Could anyone suggest a solution? I think I should reinstall PostGIS and mapserver, enabling some flags to PostGIS support GDAL (?), but do not know how to do.

thanks in advance
,

--
Marcello Benigno B. de Barros Filho
Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
Mestre em Ciências Geodésicas e Tecnologias da Geoinformação - UFPE
Doutorando em Tecnologia Ambiental e Recursos Hídricos - UFPE
http://profmarcello.blogspot.com
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Reijer Copier | 14 Apr 15:02 2014
Picon

curves geometries and topology

Dear list,

According to the documentation, PostGIS Topology only supports edges 
made out of linestrings. However, we are currently working on a dataset 
that contains lots of curved geometries. It would be great if we could 
build topology based on those curved geometries without having to 
convert them to linestrings first. Is this possible? If not, what is the 
best way to deal with this situation?

--

-- 

Kind regards,

Reijer Copier
IDgis bv
Mark Volz | 14 Apr 14:25 2014
Picon
Picon

setting up a read only user / group for AutoCAD, ArcGIS, QGIS, and MapServer.

Hello,

 

I would like to set up a user account in PostGIS / PostGRES with the following:

·         The user has read only access to all of the layers in a particular database.

·         The user also have read only access to any layers added or updated through the shapefile uploader.

·         The client software may be ArcGIS*, AutoCAD (Map), QGIS, MapServer, etc.

 

*ArcGIS will use “query layers”, not SDE.

 

If anyone has any cliff notes on how to properly  set up read only permissions please let me know.

 

Thank You

 

Sincerely,

Mark Volz, GISP

 

 

_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Picon

How to check if two linestring are near to each other

Hi,

I have formed a graph using my GPS traces of running/biking activities in which I have many edges representing the same path. For example every time I run from node-A to node-B my GPS traces are noted close to each other like the red,green,blue lines in the attached image. Actually those 3 lines are same(representing the same path), so I want to detect such linestrings automatically and keep only one linestring and ignore others. Is there any way in PostGIS which can help me to detect the nearness/closeness of the linestrings?

--
Thanks and Regards,
Raghavan KL
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Jay Moss | 9 Apr 18:58 2014
Picon

problems with 2.1.2 and new databases

I've got a problem with the new 2.1.2 release.  If I upgrade in place everything appears fine.  


BUT, if I'm installing a new db server (PostgreSQL 9.2.8.2, 64bit, windows), the create script that I have been using successfully with previous versions now fails (in step 5 below) with the following error:

    PostGIS is already installed in schema 'public', uninstall it first

Here's my installation process and what's failing:

   1. create a new db using createdb.exe.
   2. spatially enable it using psql and "CREATE EXTENSION postgis".
   3. create some permissions, groups, and roles, and grant access to the db...
   4. update the postgressql search path to add my new db at the front of the list.
   5. run  \share\contrib\postgis-2.1\postgis.sql  -  FAILS
   6. run  \share\contrib\postgis-2.1\spatial_ref_sys.sql
   7. run  \share\contrib\postgis-2.1\postgis_comments.sql

I've tried removing the postgis scripts (all 3) and if I do that, my database does not appear to actually work with the spatial datatypes - I get errors that my geometry columns datatype isn't defined.  The second and third script appear to be dependent on the first.

One other item of note: When I install PostGIS, I'm NOT checking the "create spatial database" option. I don't really want the sample db's on my servers - I just want the one I create to be spatially enabled.

thanks in advance
j
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Marcello Benigno is still waiting for you to join Feedspot...

Marcello Benigno is still waiting for you to join Feedspot - A Google Reader for Professionals.
www.feedspot.com

Feedspot is a place to Organize and Read all the sites you visit in one place, where keeping up with your favorite sites is as easy as checking your email. It's integration with Google News lets you get news tailored specifically to your interests. Feedspot seamlessly integrates with twitter, fb, pocket, evernote, instapaper, buffer and readability.

Start using Feedspot today to get a complimentary month of Feedspot Premium, with even more of the features that make Feedspot great. And just for trying Feedspot, your friend will get rewards too.




- The Feedspot Team


This email was sent to postgis-users <at> lists.osgeo.org. You are receiving pending invitation emails.
You received this email because your friend Marcello Benigno (benigno.marcello <at> gmail.com) invited you to join Feedspot.
Click here to Unsubscribe if you wish not to receive pending invitation from Marcello Benigno via Feedspot.
Feedspot.com, 303 Cape Court, Mill Valley, CA 94941
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Marcello Benigno is still waiting for you to join Feedspot...

Marcello Benigno is still waiting for you to join Feedspot - A Google Reader for Professionals.
www.feedspot.com

Feedspot is a place to Organize and Read all the sites you visit in one place, where keeping up with your favorite sites is as easy as checking your email. It's integration with Google News lets you get news tailored specifically to your interests. Feedspot seamlessly integrates with twitter, fb, pocket, evernote, instapaper, buffer and readability.

Start using Feedspot today to get a complimentary month of Feedspot Premium, with even more of the features that make Feedspot great. And just for trying Feedspot, your friend will get rewards too.




- The Feedspot Team


This email was sent to postgis-users <at> postgis.refractions.net. You are receiving pending invitation emails.
You received this email because your friend Marcello Benigno (benigno.marcello <at> gmail.com) invited you to join Feedspot.
Click here to Unsubscribe if you wish not to receive pending invitation from Marcello Benigno via Feedspot.
Feedspot.com, 303 Cape Court, Mill Valley, CA 94941
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
islanis | 5 Apr 21:28 2014
Picon

getting unexpected results on an ST_Intersects query

Hi folks, I'm having problems when I try to run a simple query to  
update the gidmunic field of ft_cubo layer, and it assigns a value  
that does not exists in said field, please, i need help , the two  
layers are multipolygon type. what should I do?

UPDATE
  ft_cubo
SET
  gidmunic = sigfre_cub_adm_munic.gid
FROM sigfre_cub_adm_munic
WHERE
ST_Intersects(ft_cubo.the_geom,sigfre_cub_adm_munic.the_geom);

thanks in advance

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

--

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el
cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el
compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/
Shane StClair | 5 Apr 21:29 2014

looking for a public well known maven repository for postgis-jdbc 2.1 and later on versions

I just submitted a patch [1] to generate javadoc and source jars as part of the postgis-jdbc build. Otherwise, the existing pom meets the Maven Central sync requirements [2].

There are two options for getting up to date postgis-jdbc releases into Maven Central. The first would be for Maven Central deployment to become part of the postgis release process. After the initial setup the Maven Central publishing process isn't terribly painful, but it would require a postgis developer to assume responsibility for the Maven Central submission and for postgis-jdbc to get special consideration during releases [3] [4].

The other option would be to have the community manually upload to Maven Central [5]. This is definitely not the ideal situation, but if Maven Central uploads are out of scope for the postgis devs right now it would allow us to get updated versions into the central repo. A blessing from the postgis devs would help in this second case.

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

Gmane