sablok | 26 Jul 19:20 2016
Picon

Encountering error while creating the PostGIS extension!!

I am trying to create PostGIS extension for my local database which in my
case is "localdatabase" the command I am using to create the extension is
the following :

"./bin/psql -d localdatabase -c "CREATE EXTENSION postgis;""

but when I execute this command I get the following error -:
*ERROR:  could not load library
"/local/home/sablok/workspace/sablok/Project/build/Project/Project-1.0/RHEL5_64/DEV/build/lib/postgresql/postgis-2.2.so":
libgeos_c.so.1: cannot open shared object file: No such file or directory*

and when I execute the command "sudo find / -name "*libgeos_c.so.*"" I get
the following paths where the libgeos_c.so exists:

//local/home/sablok/workspace/sablok/Dev/build/PostGIS/PostGIS-1.0/RHEL5_64/DEV.STD/build/lib/libgeos_c.so.1
/local/home/sablok/workspace/sablok/Dev/build/PostGIS/PostGIS-1.0/RHEL5_64/DEV.STD/build/lib/libgeos_c.so.1.9.0
/local/home/sablok/workspace/sablok/Dev/env/PostGIS-1.0/runtime/lib/libgeos_c.so.1
/local/home/sablok/workspace/sablok/Dev/env/PostGIS-1.0/runtime/lib/libgeos_c.so.1.9.0
/local/home/sablok/workspace/sablok/Dev/src/PostGIS/configuration/geos/3.5.0/geos-3.5.0/capi/.libs/libgeos_c.so.1/

I am not too sure as to how to resolve the issue, any help is appreciated.
Thanks in advance.

--
View this message in context: http://postgis.17.x6.nabble.com/Encountering-error-while-creating-the-PostGIS-extension-tp5010277.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
(Continue reading)

Jaime Casanova | 26 Jul 01:24 2016

segmentation fault in lwgeom_geos.c

Hi,

We found a problem in this query:

"""
SELECT DISTINCT vias_calle1, vias_calle2,
        x(st_transform(centroid(the_geom),4326)) as longitud,
        y(st_transform(centroid(the_geom),4326)) as latitud,
        x(centroid(the_geom)) as x, y(centroid(the_geom)) as y
  FROM (SELECT DISTINCT
                    v1.via_nombre as vias_calle1,
                    v2.via_nombre as vias_calle2,
                    st_union(ST_Intersection(v1.the_geom,v2.the_geom))
as the_geom
                 FROM bage_via as v1, bage_via as v2
              WHERE v1.via_nombre LIKE 'MAXIMILIANO RODRIGUEZ'
                    AND v2.via_nombre LIKE 'LAURO GUERRERO'
                    AND intersects(v1.the_geom,v2.the_geom)
                    AND v1.dipo_codiinec LIKE '170121%'
                    AND v2.dipo_codiinec LIKE '170121%'
               GROUP BY v1.via_nombre, v2.via_nombre
) as foo
"""

Attached a file with the backtrace, please let me know what else i can
provide to help debug this? I have access to the server with the
problem.

PostGIS full version

(Continue reading)

Karthick Thanigaimani | 25 Jul 22:49 2016
Picon

Help with PostGIS upgrade

Hi,



We have a database that is of ~1 TB and the schemas are big as well. We would like to upgrade the database version from PostgreSQL 9.3.x to 9.5.x and the DB has PostGIS 2.1.2 which also need to be updated to 2.2.2 as per version 9.5.x. 
I installed the postGIS 2.2.2 libraries and tried updating the version 2.2.2 but it says there is no upgrade path. 
and when we run the pg_upgrade compatibility check it says postGIS has to be upgraded.


Is there anyway to achieve the upgrade without doing pg_dump of the schemas.? 

Please can anyone help.

thank you.

Regards,
Karthick
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
Kevin Berger | 25 Jul 19:05 2016

PostGIS raster data restore issue

Hi,

 

We want to test our PostGIS Version 2.2.2.1/PostgreSQL 9.5.2.1 restore. We have raster data loaded into the database.

 

The backup command we are using is: pg_dump.exe -c -C (We specify -C as we want the SQL for creating databases to be in the dump file - we want to simplify the restore operation by having the database automatically created as opposed to having to create an empty database then restore the data into it). The dump file is 32 GB so modifying the dump file in Notepad++ is not an option.

 

The restore command we are using is: psql -U postgres -f <dumpfile>. However, we get several restore errors such as:

 

ERROR:  function st_bandmetadata(public.raster, integer[]) does not exist

 

I am thinking that the only thing we can do is to create an empty database then restore the data into it (which as I mentioned adds more steps to restore). Is my rationale correct?

 

NOTE: the restore does work fine on a database that does not contain raster data.

 

Kevin

_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
Marcin Mionskowski | 22 Jul 13:04 2016
Picon

Different results of ST_SnapToGrid variants

Dear Users!
I would like to ask you for help with ST_SnapToGrid...

The background:

ST_SnapToGrid (http://postgis.net/docs/ST_SnapToGrid.html) has 4 variants, of which I'm interested
in first 3.
Results of variant II and III are the same (those functions are using variant I function, with grid origin
set to (0,0)):
II.  SELECT ST_AsText(ST_SnapToGrid(ST_GeomFromText('POINT(100000.005 100000.006)'),0.01,0.01))
III. SELECT ST_AsText(ST_SnapToGrid(ST_GeomFromText('POINT(100000.005 100000.006)'),0.01))
Result:
> "POINT(100000 100000.01)"
.005 is rounded to .00 (!) and .006 to .01

I get different (correct) result with variant I, when I set custom grid origin:
SELECT ST_AsText(ST_SnapToGrid(ST_GeomFromText('POINT(100000.005 100000.006)'),100000,100000,0.01,0.01))
> "POINT(100000.01 100000.01)"

but when I change coordinates:
SELECT ST_AsText(ST_SnapToGrid(ST_GeomFromText('POINT(141944.005 150100.006)'),100000,100000,0.01,0.01))
I get wrong results again:
> "POINT(141944 150100.01)"

I've done some generate_series tests - it seams, that the problem is related to:
- "distance" between coordinate and grid origin, with respect to grid size
and/or
- "conversion" between numeric types: decimal (point and grid definition in my examples) and double
precision (coordinates in geometry type).

My question:
What are the real reasons for above-mentioned problems?
Can I somehow bypass them to properly (.005->.01) and efficiently (approx 20 mln polygons) round coordinates?

Regards,
Marcin
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
Karthick Thanigaimani | 21 Jul 23:16 2016
Picon

Re: PostGIS upgrade with Postgres9.3

Hi,



We have a database that is of ~1 TB and the schemas are big as well. We would like to upgrade the database version from PostgreSQL 9.3.x to 9.5.x and the DB has PostGIS 2.1.2 which also need to be updated to 2.2.2 as per version 9.5.x. 
I installed the postGIS 2.2.2 libraries and tried updating the version 2.2.2 but it says there is no upgrade path. 
and when we run the pg_upgrade compatibility check it says postGIS has to be upgraded.


Is there anyway to achieve the upgrade without doing pg_dump of the schemas.? 

Please advise.

Thanks,
Karthick


_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
Brian Peschel | 21 Jul 17:04 2016

st_astext() created invalid

Not sure I understand what is happening here.

I have a geom:
select * from my_temp ;
                                                                                                                                                                                                geom                                                                                                                                                                                               
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 0103000020AD100000010000000B0000006D514CC326AC57C029776BF2CF214440B742588D25AC57C0D7F84CF6CF2144406E514CC326AC57C029776BF2CF21444015CCF33B28AC57C084FAF1F2CF2144405748540328AC57C096010C70E621444090EC5BF720AC57C0D8C2876DE62144409C3B551921AC57C0AFFE19EFD8214440F555A82421AC57C0043D2F70D42144401508BE2F21AC57C07110D308D02144404E70FB2F21AC57C0C5BB6DF0CF2144406D514CC326AC57C029776BF2CF214440

Which PostGIS says is valid:
select st_isvalid(geom) from my_temp ;
 st_isvalid
------------
 t
(1 row)

I then convert to a format I can read:
select st_astext(geom) from my_temp ;
                                                                                                                                                       st_astext                                                                                                                                                      
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 POLYGON((-94.6898658986372 40.2641585373625,-94.689792 40.264159,-94.6898658986372 40.2641585373625,-94.6899557 40.2641586,-94.6899422 40.2648449,-94.6895121 40.2648446,-94.6895202 40.2644328,-94.6895229 40.2642956,-94.6895255428102 40.2641612082088,-94.6895256 40.2641583,-94.6898658986372 40.2641585373625))
(1 row)

But that isn't valid.  It is self intersecting (point 1 and point 3 repeat).  And if I check the validity of the st_astext version:
select st_isvalid(geom), st_isvalid(st_geomfromtext(st_astext(geom), 4269)) from my_temp;
NOTICE:  Self-intersection at or near point -94.689865898637194 40.264158537362498
 st_isvalid | st_isvalid
------------+------------
 t          | f
(1 row)

Any idea what is going on here and how can I prevent it?

TIA!
- brian
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
Michael Treglia | 21 Jul 04:34 2016
Picon

Question about ST_Difference across two layers with many multipolygons

Hi All,

Please pardon this fairly general question - I'm struggling with using ST_Difference, and think I might be missing something just about the intended way ST_Difference functions, as I'm still learning PostGIS... I think the answer to this will help me troubleshoot or at least lead me to ask better questions down the line.

So, I have a set of large and many multipolygons (islands) within one layer, and many smaller sets of multipolygons that are contained within the islands  (parks) in another layer. I'm trying to effectively clip out the parks from the islands, so basically the end result will be the Islands with many holes throughout. The code I was expecting to use was along the lines of this:

SELECT ST_Difference(islands.geom, parks.geom) AS newgeom INTO test.islands_noparks FROM staging.parks, staging.islands 

However, this is producing the entire islands, but with many rows (just about as many rows as there are parks). Thus, I think I might be a bit confused about how ST_Difference is intended to function. Would anybody be able to clarify?

Thanks so much for your time! Best,
Mike
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
Vitaliy Semochkin | 20 Jul 12:41 2016
Picon

how to calculate maximum with and height of rectangular placed in to a given polygon

Hello,

Are there any spatial functions that  returns maximum width/ height
of a rectangular that can be placed into a given polygon ?



Regards,
Vitaliy
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
Chris Lee | 18 Jul 20:39 2016
Picon

pg_restore raster workaround help

Has anyone had any luck with http://postgis.net/docs/manual-2.2/RT_FAQ.html#faq_raster_data_not_restore?

I have backed up a raster only schema coming from 9.4/2.2 going to 9.5/2.2. Can you please clarify "make sure to install in same schema as your backup was installed in" ?

The PostGIS extension is on public and I tried loading just the schema (rasters) before loading the data. How can I find rtpostgis_proc_set_search_path.sql ?

Thanks,

Chris
_______________________________________________
postgis-users mailing list
postgis-users <at> lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users
Pradeep | 18 Jul 12:51 2016

Functionality--Support

Hi,

 

Please confirm below functionality will support in PostGIS or not?

 

1)         Spatial option that provides advanced spatial features to support high-end GIS and LBS solutions

2)         Querying, and retrieval for 3-dimensional (3D) data including points, lines, surfaces, triangulated irregular networks (TINs - an alternative to raster’s), and point clouds.

3)         Spatial queries can now run in parallel on partitioned spatial indexes, improving the performance of "within distance", "nearest neighbor", and "relate" queries

4)         SQL/MM types and operators, as specified in ISO 13249-3, Information technology - Database languages - SQL Multimedia and Application Packages . Operators corresponding to those defined in this standard, as well as the SDO_NN and SDO_WITHIN_DISTANCE operators should be able to be used on data stored in the SQL Multimedia root type

 

Thanks & Regards

Pradeep Kanth

Ext : 3026

 

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

Gmane