postgis/postgis
Paul Ramsey d3cf06c2e0 Add ST_ClusterIntersectingWin and ST_ClusterWithinWin, windowing
function analogues to ST_ClusterIntersecting and ST_ClusterWithin.
New functions return a cluster id within the current window partition,
which should be easier to work with than the large collections
returned by the older functions.
2023-03-01 12:34:44 -08:00
..
brin_2d.c Fix some spelling errors 2018-03-02 01:47:41 +00:00
brin_common.c Add support for BRIN indexes - missed new files on last commit 2016-07-31 04:34:16 +00:00
brin_nd.c Address warnings across liblwgeom/ and postgis/ 2018-02-13 13:08:25 +00:00
DEBUG Change the name of the main source directory. This is going to break the build for a little while until I fix all the references, but I want to do it atomically to ensure version history is preserved. 2009-02-11 18:22:32 +00:00
flatgeobuf.c Fix compile warnings/errors against pg16devel 2022-12-13 17:43:08 -08:00
flatgeobuf.h FlatGeobuf format input/output 2021-09-20 20:05:25 +02:00
geobuf.c Enforce protobuf-c dependency 2020-10-05 10:52:13 +02:00
geobuf.h Enforce protobuf-c dependency 2020-10-05 10:52:13 +02:00
geobuf.LICENSE Geobuf output support via ST_AsGeobuf 2017-02-26 18:16:54 +00:00
geobuf.proto specific protobuf syntax 2020-03-02 11:34:11 -08:00
geography_brin.sql.in Remove support for Postgres < 9.5. 2018-12-03 09:03:57 +00:00
geography_btree.c Avoid memory exhaustion when building a btree index (references #4004) 2018-01-26 12:43:51 +00:00
geography_centroid.c Lengthen proj cache lifetime to the life of the backend, and move memory context appropriately to match. Simplify the retrieval of global constants somewhat to not require FunctionCallInfo anymore. References #4890 2021-05-17 08:43:22 -07:00
geography_inout.c Fix PG 15 building atoi removed. References #5100 for PostGIS 3.3.0 2022-02-19 00:21:01 -05:00
geography_measurement_trees.c Share gserialized objects between different cache types 2020-05-11 12:53:58 +02:00
geography_measurement_trees.h Share gserialized objects between different cache types 2020-05-11 12:53:58 +02:00
geography_measurement.c Reject infinite coordinates in _ST_BestSRID 2023-02-26 22:32:24 -05:00
geography.h Style only change: remove trailing whitespaces 2016-04-27 14:45:28 +00:00
geography.sql.in Remove support for PostgreSQL < 12 2022-09-02 20:14:25 -04:00
geometry_inout.c Optimize geometry_to_point 2020-05-01 16:58:04 +02:00
gserialized_estimate.c Handle selectivity estimation on smaller tables a little less ham-handedly. 2022-12-13 16:24:57 -08:00
gserialized_gist_2d.c Fix compile warnings/errors against pg16devel 2022-12-13 17:43:08 -08:00
gserialized_gist_nd.c Fix compile warnings/errors against pg16devel 2022-12-13 17:43:08 -08:00
gserialized_spgist_2d.c Fix compile warnings/errors against pg16devel 2022-12-13 17:43:08 -08:00
gserialized_spgist_3d.c Lengthen proj cache lifetime to the life of the backend, and move memory context appropriately to match. Simplify the retrieval of global constants somewhat to not require FunctionCallInfo anymore. References #4890 2021-05-17 08:43:22 -07:00
gserialized_spgist_3d.h SP-GiST implementation polishing 2018-07-13 20:06:43 +00:00
gserialized_spgist_nd.c Lengthen proj cache lifetime to the life of the backend, and move memory context appropriately to match. Simplify the retrieval of global constants somewhat to not require FunctionCallInfo anymore. References #4890 2021-05-17 08:43:22 -07:00
gserialized_supportfn.c Remove support for PostgreSQL < 12 2022-09-02 20:14:25 -04:00
gserialized_typmod.c Allow singleton types to insert into multi* typmod columns by promoting the input geometry. 2023-02-26 16:39:04 -08:00
legacy_gist.sql.in Formatting: remove trailing whitespace from .sql files. 2018-01-17 20:39:03 +00:00
legacy_minimal.sql.in Formatting: remove trailing whitespace from .sql files. 2018-01-17 20:39:03 +00:00
legacy.sql.in Use integer instead of int4. References #5191 for PostGIS 3.3.0. For raster, geography, and legacy 2022-07-25 15:24:30 -04:00
long_xact.c Move to using snprintf for fixed length buffers. 2022-07-25 14:01:44 -07:00
long_xact.sql.in Formatting: remove trailing whitespace from .sql files. 2018-01-17 20:39:03 +00:00
lwgeom_accum.c Remove support for PostgreSQL < 12 2022-09-02 20:14:25 -04:00
lwgeom_accum.h Expose fixed-precision overlay functions 2020-09-11 10:52:02 +02:00
lwgeom_box.c Speed up ST_CombineBbox(box2d, geometry) for compressed values 2020-07-29 13:15:42 +02:00
lwgeom_box3d.c Fix compile warnings/errors against pg16devel 2022-12-13 17:43:08 -08:00
lwgeom_box3d.h Drop support for PostgreSQL 9.6 and 10 2022-02-17 17:14:25 -05:00
lwgeom_btree.c Fast Hilbert btree. 2019-07-14 14:24:18 +00:00
lwgeom_dump.c Expose fixed-precision overlay functions 2020-09-11 10:52:02 +02:00
lwgeom_dumppoints.c ST_DumpPoints and ST_DumpSegments crash on multipolygon 2022-09-27 20:38:49 -04:00
lwgeom_export.c Include srs in GeoJSON where it exists in spatial_ref_sys, closes #4799 2021-08-25 10:56:07 -07:00
lwgeom_functions_analytic.c Speed up ST_Simplify 2019-09-24 10:58:30 +00:00
lwgeom_functions_analytic.h Update copyright header to add explicit license version 2015-12-14 10:11:21 +00:00
lwgeom_functions_basic.c Prevent crash on infinite coordinates 2023-02-16 13:20:37 -05:00
lwgeom_functions_lrs.c Typo: 2st -> 2nd 2022-08-30 14:43:56 +02:00
lwgeom_functions_temporal.c Remove unused errno.h includes. 2018-09-12 17:21:38 +00:00
lwgeom_generate_grid.c Drop execute bit from source file 2021-12-26 21:21:48 +01:00
lwgeom_geos_clean.c Add a new ST_MakeValid() signature that takes options to control 2021-04-27 12:04:43 -07:00
lwgeom_geos_prepared.c Share gserialized objects between different cache types 2020-05-11 12:53:58 +02:00
lwgeom_geos_prepared.h Share gserialized objects between different cache types 2020-05-11 12:53:58 +02:00
lwgeom_geos_relatematch.c Drop cstring2text/text2cstring in favor of PostgreSQL functions 2018-02-20 16:16:45 +00:00
lwgeom_geos.c Free lwgeom 2023-02-17 01:48:17 -05:00
lwgeom_geos.h Share gserialized objects between different cache types 2020-05-11 12:53:58 +02:00
lwgeom_in_encoded_polyline.c Drop cstring2text/text2cstring in favor of PostgreSQL functions 2018-02-20 16:16:45 +00:00
lwgeom_in_flatgeobuf.c FlatGeobuf format input/output 2021-09-20 20:05:25 +02:00
lwgeom_in_geohash.c Cache getSRIDbySRS 2020-05-01 16:48:39 +02:00
lwgeom_in_geojson.c Cache getSRIDbySRS 2020-05-01 16:48:39 +02:00
lwgeom_in_gml.c Remove support for PostgreSQL < 12 2022-09-02 20:14:25 -04:00
lwgeom_in_kml.c Move postgres.h include to top to fix mingw64 issues 2021-03-11 13:04:48 -05:00
lwgeom_in_marc21.c Add MARC21/XML parser, from @jimjonesbr 2022-02-17 08:32:38 -08:00
lwgeom_inout.c ST_AsLatLon infinite coordinate. References #5342 for PostGIS 3.4 2023-02-18 03:18:24 -05:00
lwgeom_ogc.c Test for empty before reading start point. Closes #5036 2022-01-25 11:26:21 -08:00
lwgeom_out_flatgeobuf.c FlatGeobuf format input/output 2021-09-20 20:05:25 +02:00
lwgeom_out_geobuf.c Repair crashes in raster aggregates, references #4916, #4770, #4724, #4916 2021-08-20 14:02:03 -07:00
lwgeom_out_geojson.c Missed a spot, References #5231 for PostGIS 3.4.0 2022-09-03 13:45:12 -04:00
lwgeom_out_marc21.c Add MARC21/XML parser, from @jimjonesbr 2022-02-17 08:32:38 -08:00
lwgeom_out_mvt.c Lengthen proj cache lifetime to the life of the backend, and move memory context appropriately to match. Simplify the retrieval of global constants somewhat to not require FunctionCallInfo anymore. References #4890 2021-05-17 08:43:22 -07:00
lwgeom_rectree.c Share gserialized objects between different cache types 2020-05-11 12:53:58 +02:00
lwgeom_rtree.c Share gserialized objects between different cache types 2020-05-11 12:53:58 +02:00
lwgeom_rtree.h Share gserialized objects between different cache types 2020-05-11 12:53:58 +02:00
lwgeom_spheroid.c Move to snprintf where easily done 2022-07-25 14:58:45 -07:00
lwgeom_sqlmm.c Implement extended ST_CurveToLine signature 2017-06-19 16:06:59 +00:00
lwgeom_transform.c postgis: Add transform pipeline SQL functions. 2022-10-20 12:20:37 +01:00
lwgeom_triggers.c Fix compile warnings/errors against pg16devel 2022-12-13 17:43:08 -08:00
lwgeom_union.c parallel ST_Union: NULL argument checks removed from STRICT functions 2022-06-21 16:10:04 +03:00
lwgeom_union.h parallel ST_Union 2022-06-21 16:10:04 +03:00
lwgeom_window.c Add ST_ClusterIntersectingWin and ST_ClusterWithinWin, windowing 2023-03-01 12:34:44 -08:00
Makefile.in Rename create_undef.pl to create_uninstall.pl 2023-02-27 22:27:27 +01:00
mvt.c mvt: introduce feature_builder and fix a buffer overflow 2022-04-30 16:40:15 -04:00
mvt.h mvt: introduce feature_builder and fix a buffer overflow 2022-04-30 16:40:15 -04:00
postgis_after_upgrade.sql parallel ST_Union: dropping pgis_geometry_union_finalfn 2022-06-22 20:19:35 +03:00
postgis_before_upgrade.sql search_path vulnerability during install. References #5069 2022-02-28 15:40:17 -05:00
postgis_brin.h Add support for BRIN indexes - missed new files on last commit 2016-07-31 04:34:16 +00:00
postgis_brin.sql.in Add parallellism and cost properties to brin functions 2019-11-15 15:46:25 +01:00
postgis_legacy.c parallel ST_Union pgis_geometry_union_finalfn function removed 2022-06-21 16:11:58 +03:00
postgis_letters.sql Mark ST_Letters as Parallel Safe. Add test for ST_Letters 2022-05-07 03:23:10 -04:00
postgis_libprotobuf.c Remove --without-wagyu option 2021-01-08 17:14:29 +01:00
postgis_module.c Move version for log wrapping errors up to 6, references #5332 2023-02-15 10:59:07 -08:00
postgis_spgist.sql.in Drop support for PostgreSQL 9.6 and 10 2022-02-17 17:14:25 -05:00
postgis.sql.in Add ST_ClusterIntersectingWin and ST_ClusterWithinWin, windowing 2023-03-01 12:34:44 -08:00
README Change the name of the main source directory. This is going to break the build for a little while until I fix all the references, but I want to do it atomically to ensure version history is preserved. 2009-02-11 18:22:32 +00:00
sqldefines.h.in Reduce "high" and "medium" costs by a factor of two. 2022-10-19 15:03:13 -07:00
uninstall_geography.sql.in Formatting: remove trailing whitespace from .sql files. 2018-01-17 20:39:03 +00:00
uninstall_legacy.sql.in Drop the .c suffix of sql files to preprocess 2013-03-18 17:20:18 +00:00
uninstall_long_xact.sql.in Formatting: remove trailing whitespace from .sql files. 2018-01-17 20:39:03 +00:00
uninstall_sfcgal.sql.in add sfcgal_full_version 2022-01-07 01:18:20 -05:00
uninstall_sqlmm.sql.in Formatting: remove trailing whitespace from .sql files. 2018-01-17 20:39:03 +00:00
vector_tile.LICENSE Mapbox vector tile output support via ST_AsMVT 2017-02-06 16:33:23 +00:00
vector_tile.proto MVT: Improve performance and memory usage 2020-08-17 18:14:38 +02:00

Welcome to the Initial version of LWGEOM.

More information is available on the PostGIS user's mailing list and 
the PostGIS developer's mailing list.  

Differences
-----------

The LWGEOM is very much like the original PostGIS GEOMETRY type.  The 
main differences are:

a) LWGEOMs are much smaller than the PostGIS GEOMETRY
b) LWGEOMs natively support 2d, 3d, and 4d points
c) LWGEOMs are indexed using single-precision bounding boxes.  This
   make the indexes significantly smaller than PostGIS GEOMETRY
   indexes.
d) LWGEOMs are internally very similar to OGC WKB   
e) The "normal" view of LWGEOMs is OGC WKB - PostGIS GEOMETRY is OGC WKT
f) PostGIS geometries have a built-in BOX3D.  LWGEOMs have an *optional*
   BOX2D (see below).


Also included with the LWGEOMs is a type called 'box2d'.  This is
very similar to PostGIS BOX3D type:

a) BOX2Ds are 2D - BOX3D is 3D
b) BOX2Ds are represented by single-precision floating point numbers,
   while BOX3Ds are double-precision floating point numbers.
c) BOX2Ds will sometimes be slightly larger than you might expect.
   This is because the conversion from double-precision to 
   single-precision is inexact.  When this happens, the BOX2D will
   automatically expand itself.
   

Bounding Boxes
--------------

<this section for advanced users.  Ignore it if you don't understand
 what its saying.>

Bounding boxes are optional in LWGEOMs.  By not having one, you are
saving a small amount of space per LWGEOM geometry (16 bytes).

Bounding boxes are attached to any non-POINT geometry by default.

You can disable this automatic addition setting AUTOCACHE_BBOX to 0
in the top-builddir Makefile.config and read BBOXCACHE_BEHAVIOURS
for function-by-function behaviour explanation.

Manual control of bbox cache is available using DropBBOX() and AddBBOX().

UPDATE <table> SET <geomcol> = DropBBOX(<geomcol>);
UPDATE <table> SET <geomcol> = AddBBOX(<geomcol>);

Note that if you don't cache a BBOX spatial operators will be much slower,
as they'll need to compute all the boxes at every invokation.
If you use GiST indexes you will still note a slow down as a RECHECK
clause is specified for GiST operators. Also, GiST index updating
will be slower w/out a BBOX cache.


Space Saving
------------

LWGEOM indexes are approximately 40% smaller than PostGIS indexes.

A LWGEOM 'POINT(0 0)' takes up 21 bytes, a POSTGIS 'POINT(0 0)' takes
up 140 bytes.  This shows that LWGEOMs have a much smaller overhead.

LWGEOMs will store 2D points as 2 double precision numbers (16 bytes) -
PostGIS will store 2D points with 3 numbers (24 bytes).   This can be 
another big savings.