8,193 reputation
11327
bio website blog.jordogskog.no
location Hedmark, Norway
age
visits member for 4 years, 6 months
seen 28 mins ago

Apr
7
comment ST_MakePoint returns an error when using Python
Take a look at the log of the postgresql server. There you will see how the query is received from python to PostGIS.
Apr
2
comment st_length column in Postgres db and ArcGIS under WGS84
If it is PostGIS that populates that length column, the PostGIS doc is the place to look. Second sentance: postgis.net/docs/manual-2.1/ST_Length.html
Mar
23
comment Increase buffer until value is reached?
Well, 600 points to compare to 300k points is not that much. With a spatial index it is close to nothing :-). And if you combine sales points and dealers by some attribute instead of doing it spatial by distance it is even cheaper.
Mar
19
comment How to select distinct geometries and ids with PostGIS?
And if you want to be sure to get the first occurrence in the table, you have to sort on something giving the right order. I don't think that the row order is guaranteed.
Mar
19
comment How to select distinct geometries and ids with PostGIS?
A note: This will compare the bounding box, not the actual geometry. So, two geometries that share the exactly same bounding box will be regarded as the same, and only 1 of them will be returned. It is much safer (and faster) to use id if you have.
Mar
16
comment How to improve ArcGIS Desktop 10.2.2 and Postgres 9.2 PostGIS geometry performance?
@Jay Cummins Interesting! That must more or less be considered a bug I guess?
Feb
24
comment What's the PostGIS equivalent to Extract Nodes in fTools / QGIS?
Just a typo. It should have been "it" :-)
Dec
2
comment create spatial data on the fly for a timeline application
PostGIS can ...
Dec
2
comment finding the outermost border of a set of geomertries (circles)
St_union is what you want. It removes the interior borders. Then checking the distances to the vertexes is not enough since the correct answer might be on an edge between. St_closestpoint will check both vertex points and edges
Dec
2
comment finding the outermost border of a set of geomertries (circles)
Right you are,thanks :-)
Nov
30
comment PostGIS doesn't use index for spatial query
You don't use any function that can use the index. Use st_dwithin instead. Then the fuction will first do an index scan.
Nov
17
comment Hardware requirements for one instance Geoserver/PostGIS
Great, then I understand. GeoServer and Java is the bottleneck. But as you say it shouldn't be any problem.
Nov
16
comment Hardware requirements for one instance Geoserver/PostGIS
@user30184 Well, if you cache the output so the server only serves static data I gyess 1 GB will give quite decent performance. And to render and cache 20 mb of data in all zoom levels shouldn't be that heavy, should it? But maybe geoserver is demanding, that I don't know so well.
Oct
28
comment Spatial search performance on a collection of Points in a PostGis database
about "very slow" I have to ask if you really have a functional spatial index. do explain tell you that you have an index scan? and is "very slow" compared to something else or just takes to long to run your query? the slow part of st_dwithin is the recheck where all results from the index scan is checked by real distance calculations. if you just expand bboxes and use the && operator it will be very fast. Look at the sql-definition of st_dwithin how it is done. there is a special trick to keep the index working by expanding one of the two comparing points and then the other.
Oct
28
comment Spatial search performance on a collection of Points in a PostGis database
Well, It can. It could be just that the box have all corners in the point. In PostGIS bboxes is represented with Int32 coordinates and the point with Int64 coordinates. So the box actually has a small area. it doesn't matter if the index gives a few false positive intersections since the result is rechecked.
Oct
14
comment ST spatial queries to select multi-level location
Your query will not work because the query compares all rows to all rows which means that when the point intersect 1 point it also disjoint at least most of the polygons in table 2. So you need to work with a subquery in some way. There are many options.
Sep
28
comment Extract longitude latitude and radius from POSTGIS column
How different value? About radius you can use st_maxdistanse and divide by 2 but it will not give you an exact value either. That is because the buffer is just an appriximation of a circle built of a limited number of points.
Sep
22
comment PostGIS: Get closest point between geometry and Multipoint
No ST_ClosestPoint, ST_ShortestLine and ST_Distance all behave the same. For a collection they iterate all vertexpoints and test against both the vertex points and the line between the points. In some cases it takes a shortcut but the result is the same.
Sep
19
comment PostGIS: Get closest point between geometry and Multipoint
Collecting all geometries from table 2 is a way to compare a geometry in table 1 with all geomeries in table 2. Another way is ordering by distance and using distinct.
Aug
5
comment C# geometry hex decoder
Do you mean that you have no control over the actual query? That seems like making things hard. What you have is wkb as hex values. So you need to read wkb and make that readable for whatever you are going to feed it into.