[postgis-users] Memory management in postgres (with liblwgeom functions in particular)

2015-03-30 Thread Igor Stassiy
Hello, I am developing a C++ extension (most of the code is C++) for postgres that links dynamically with liblwgeom, without linking to postgis. I call liblwgeom functions that serialize/deserialize LWGEOM* (and similar structures) that don't need a backend like GEOS. I wonder how is the memory

[postgis-users] Does ST_SimplifyPreserveTopology preserve contains property

2015-03-26 Thread Igor Stassiy
Hello, does any postgis implementation of ST_SimplifyPreserveTopology preserve contains property for polygons and multilines, that is, if I have a (Multi)Polygon Parent and a (Multi)Linestring/(Multi)Polygon Child s.t. ST_Contains(Parent, Child) holds, will

[postgis-users] Difference between light-weight geometry types

2015-03-23 Thread Igor Stassiy
Hello, is there any difference between LWCOLLECTION and LWCOMPOUND? Has the meaning changed since postgis 1.5 (when liblwgeom wasn't yet packaged) to liblwgeom = 2.0? Also, what does LWCIRCSTRING stand for? Is it a closed line string? Thanks a lot, Igor

Re: [postgis-users] wrong distance calculation

2015-03-18 Thread Igor Stassiy
you are using numeric(10, 2), which trims all except 2 decimal digits. that will cause a huge error in calculations. -Igor On Wed, Mar 18, 2015 at 7:56 PM Ahmet Temiz ahmettemi...@gmail.com wrote: hello I am trying to calculate the distance from the schools to active faults and their

[postgis-users] Postgres not using GiST index in a lateral join

2015-03-04 Thread Igor Stassiy
Hello, I have a query plan optimization question. It is formatted nicely on http://stackoverflow.com/questions/28856452/postgres-not-using-gist-index-in-lateral-join But here is a copy for the archive: Here is the setup: CREATE EXTENSION postgis; DROP TABLE IF EXISTS A; DROP TABLE IF EXISTS

Re: [postgis-users] Finding Geometries that overlap with the given ones

2015-03-03 Thread Igor Stassiy
clause will be; in that case it'll apply them left to right. P. On Tue, Mar 3, 2015 at 2:14 AM, Igor Stassiy istas...@gmail.com wrote: Hello, Lets say I have two tables CREATE EXTENSION postgis; DROP TABLE A; DROP TABLE B; CREATE TABLE A(shape Geometry, id INT); CREATE TABLE B