Tagged Questions
0
votes
1answer
55 views
ST-Links convert Feature Class to DB Table error
I'm using ArcMap with the ST-Links SpatialKit Conversion tool to convert a Feature Class to a DB Table. But I'm getting an error: ERROR: 42601: type modifier is not allowed for type "geometry".
I ...
0
votes
1answer
190 views
Make POINT from longitude/latitude coordinates from existing table in PostGIS
I would like to make a POINT using the longitude and latitude columns of an existing table. Here's a link to the documentation of ST_MakePoint.
Here's my table:
CREATE TABLE sysinst.bio (
oid ...
2
votes
0answers
56 views
Which is better for storage? Geometry column or varchar?
Objective:
Need to store and retrieve a list of geometries from the database. Basically these are drawn by the user using OpenLayers which I would like to save and present again as a list (kind of ...
4
votes
2answers
146 views
PostGIS algorithm to unite points of two geometries that are within specified radius
I want to find an PostGIS algorithm to unite points of two geometries that are "near" to each other.
That is: I want a function, that takes as input two geometries, and returns 1 geometry, that ...
2
votes
1answer
144 views
Geometry valid in PostGIS turns out to be not valid in Oracle
Geometry is in PostgreSQL database. It is valid.
Geometry is exported as GML and then inserted into Oracle database.
Then function SDO_UTIL.RECTIFY_GEOMETRY(geometry, tolerance) is called, which ...
13
votes
5answers
309 views
What in-depth spatial database systems tutorials exist?
Is there a good tutorial that explains in depth the internals of a GIS and a spatial database system such as PostGIS with examples and without any background assumption? I'm specifically looking for ...
4
votes
1answer
72 views
Should the geometry column always be the last column of a postgis table?
When we need to add an attribute to a table (e.g. a table of 350,000 polygons), my instinct is to always recreate the table so that the geometry column is last. I think this is a best practice for ...
3
votes
1answer
205 views
postgis error: when adding features geometry has z dimension but column does not
I have to define a geometry column in PostGIS for 2D points, but when I try to import points from DXF to postgres I get the following message:
"postgis error: when adding features geometry has z ...
1
vote
1answer
204 views
How to fix incorrect SRID of the geometry column?
I've been told to use AddGeometryColumn to properly add a column with correct/preferred SRID. however I wonder if it's possible to fix/change the current column instead of adding a new?
If there's no ...
1
vote
2answers
152 views
dealing with 2 different coordination systems in postGIS
I'm seeking a function that converts degrees to the following format:
POINT(405115.926025391 4543389.4354248)
I dont know this format's name, but is there any function to do so?
Cheers,
EDIT ...
3
votes
3answers
931 views
How to get coordinates from geometry in PostGIS?
This line: SELECT geom FROM myLayer.geom
will return a hex value, i'm wondering how would it be possible to get decimal values, a result that look likes human-readable coordination?
Regards,
3
votes
4answers
128 views
What is the easiest way to detect geometry type from text in PostGIS?
I have some records with different types of 'geometries (poly,line,points)' stored as string. I'm trying to use ST_GeomFromText as I want to do some intersection with them. What is the easiest way to ...
3
votes
1answer
92 views
Road layers appearing as points in GeoServer previews - both openlayers and GeoExp
I am wondering why my roads layer keeps appearing as points when previewed inside GeoServer - layer preview using both the OpenLayers and GeoExplorer options. The data are imported from PostGIS.
I ...
2
votes
1answer
103 views
Remove stale/obsolete geometry columns from the geometry_columns table
I understand that the function Populate_Geometry_Columns() inserts records in the geometry_columns table for geometry columns that are not yet listed there. However, an invocation of ...
1
vote
0answers
82 views
Calculating spaces between roads from PostGIS database
Is it possible to calculate the spaces between the roads using a select statement in a PostGIS/PostGre Database? I tried using some combinations of the predefined functions as ST_Intersects & ...
1
vote
1answer
161 views
How to add constraints in PostGIS?
I have table that containing road network. Table structure is
CREATE TABLE final_all_india_road_network
(
gid serial NOT NULL,
"name" character varying(254),
code character varying(254),
...
3
votes
1answer
136 views
Splitting large PostGIS/GeoServer geometry for WMS optmization
I have a large geometry (MultiPolygon) for a (fictional) world map. It basically spans a large portion of the entire world: it's the difference between a buffered extension of the union of the entire ...
0
votes
1answer
28 views
Requires Datatype for inserting features
I have imported postgis data in geoserver. In geoserver the spatial data column is displayed as MultiLineString, Does it affect when inserting features into geoserver or does it have to be explicitly ...
7
votes
2answers
296 views
Growing a PostGIS geometry by a percentage
I'm looking for a way to add a buffer around a PostGIS geometry, but the size of the buffer should depend on size of the geometry. That is, I want each geometry to be enlargened by, say, 5%.
The idea ...
8
votes
2answers
623 views
How to calculate the angle at which two lines intersect in PostGIS?
I want to calculate the angle between two lines where they intersect in PostGIS.
The starting point for angle calculations in PostGIS seems to be ST_Azimuth - but that takes points as input. My first ...
3
votes
1answer
652 views
Postgis - Converting 'geometry_dump' data type to a 'geometry' type
I am working with a dataset of property boundaries that has had ST_Union() run on it, thus all the polygons appear as a multi polygon in one row of a table. I would like to separate these out so I get ...
4
votes
2answers
197 views
Fastest way to remove matched points
Hoping someone can see a faster way of doing this, because at the moment I'm averaging 9 hours per run for what I'm trying to do and well basically getting my behind chewed off by the boss :-)
The ...
3
votes
1answer
225 views
Is ST_GeomFromText better than providing direct geometry?
I have been working with postgis recently,and in my query if I use ST_GeomFromText it execute faster than running a sub-query to get geom.
I thought ST_GeomFromText will be more expensive but after ...
2
votes
1answer
257 views
The minimum bounding circle of geometry that crosses the 180th meridian
Background: I've been given a task where I have to calculate the minimum bounding circle of Alaska (for the purpose of running a Roeck test). I'm using the Census' state level geometries available ...
1
vote
1answer
248 views
Building orientation and simplification using Opencarto Java library
I need to find out orientation of buildings and perform simplification of sides of buildings with a tolerance. I came to know from StackExchange that OpenCarto has useful libraries for geometrical ...
4
votes
1answer
193 views
Sort by geometry using INHERITS?
hope everyone's doing well.
I have a statewide point data set (parent table: 600K rows, 500 columns) I need to analyze at multiple scales based on several different spatial divisions. I'll also need ...
22
votes
4answers
2k views
PostGIS: What are the pros and cons of geography and geometry types
My company uses geometry (the_geom) data type for storing geospatial data.
I've recently been acquainted to the concept of geography (the_geog) data type which, as I understand it, stores the SRID ...
3
votes
2answers
543 views
Is the Fourth Dimension used in GIS?
Whilst working with OGR, I came across the following field used define a geographic dataset:
COORD_DIMENSION
The spatial dimension (2, 3 or 4 dimensional) of the column.
Whilst I've used 2D and 3D ...
6
votes
3answers
614 views
Retrieve polygon smallest MBR
I have a postgis table containing polygons. I want to transform my polygons to 4 points polygons : retrieve the smallest MBR.
Here comes an illustration of what I want :
My original polygon is ...
16
votes
4answers
821 views
Generalisation Strategies for Building Outlines
I have a dataset of building footprints vectorised from a raster dataset. The dataset is currently just a vector representation of the raster data. I would like a polygon dataset that only has ...
8
votes
2answers
627 views
What are the implications of invalid geometries
I've imported some data in a Postgis database and some of the geometries are reported invalid (ST_IsValidReason reports self-intersection or ring self-intersection).
The queries I am performing don't ...
14
votes
2answers
2k views
How can I find a point inside a polygon in PostGIS?
How can I find a point that is guaranteed to be within a given polygon in PostGIS?
I am aware of the ST_Centroid function. However, the centroid is not always within a polygon, see below:
...
5
votes
2answers
998 views
Unions of polygons (Postgis ST_UNION for Geography type)
I am looking for a function that will return the intersection of 2 or more polygons (geography type).
I am aware of ST_UNION, ST_COLLECT but it works only for geometry type.
Any tip will be really ...

