Reputation
10,714
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
17 32
Newest
 Yearling
Impact
~194k people reached

Feb
5
answered Inconsistent results in ST_Distance
Feb
5
comment Inconsistent results in ST_Distance
Damn. Well, looking forward to the ticket.
Feb
5
comment Inconsistent results in ST_Distance
OK, you can confirm that the algorithms differ by comparing the results of _ST_DistanceUnCached(geog,geog) to _ST_DistanceTree(geog,geog) for your one suspect pairing. If they do in fact differ, please put the pairing into a postgis ticket: you have found a bug.
Feb
5
comment Inconsistent results in ST_Distance
What PostGIS version are you running? This looks like a disagreement between the cached tree-based distance algorithm and the brute force algorithm. There were a number of such issues in 2.1 that got fixed over time in patch releases. Using the latest patch release would be recommendation #1.
Jan
25
answered Storing and updating large amount of raster data
Jan
20
comment How to cast geometry to varbinary in PostGIS / PostgreSQL
It would be interesting to see what the binary representation of some known geometries is in SQL Server. Maybe it's like PostGIS, a bastardized WKB or something.
Jan
7
comment Convert 1m to decimal degrees (WGS84) depending on polygon location
Doing the work in UTM will be far better than a hack to get an approximate degrees/meters ratio, do the transform for sure.
Jan
5
comment What causes these geometry differences between original PostGIS data and Geoserver WFS?
Since the WMS and WFS are coming from the same server, it's unlikely the SQL being generated for PostGIS differs, but using log_statement in PgSQL to example the SQL is always a good idea. My guess is that the GML writer is truncating some precision from the coordinates. Examine the GML being generated, does it stop at 4 or 5 digits, or go deeper?
Dec
15
comment PostGIS point distance from polygon not 0 when on edge
youtube.com/watch?v=GSuZP89UdGs&t=15m04s
Dec
8
comment ST_Project vs ST_Segmentize Postgis
I know it's performed on the sphere because I wrote it. To make it fast it takes a geocentric line between the end points, densifies that, and then normalizes the densified points back out to the sphere. The result is a nice great circle densification for basically a bunch of non-trigometric functions, a big computational win.
Dec
7
comment ST_Project vs ST_Segmentize Postgis
Updated above. I tried to find a distance deviation, comparing ST_Length of a raw linestring to a segmentized one, and found almost no differences at all. Are the lengths practically the same, but the paths over land the same in your case? What does the 100km refer to: length, or path difference?
Dec
7
revised ST_Project vs ST_Segmentize Postgis
added 202 characters in body
Dec
6
answered ST_Project vs ST_Segmentize Postgis
Dec
5
comment ST_Project vs ST_Segmentize Postgis
You're building two rather different lines, I think. Your "manual" line is a series of rhumb lines between points, with an unchanging bearing all the way. Your "auto" line is an orthodrome (great circle) between two points. I'd actually expect, that if you plot them on a map you'll find they not only differ in length a little, they also go to two very different parts of the world. In words: the place you get to by holding a constant bearing of 90 for 1000km is not the same as the place you get to by bearing 90 at the start and then travelling 1000km without turning.
Dec
5
comment Improve performance of a PostGIS st_dwithin query
No more than PostgreSQL takes care of non-spatial indexes automatically. There's a cost to indexing (disk space, insert/update performance, locking) and it's up to the DB user to decide when the trade-off makes sense. Glad it worked for you! :)
Dec
2
answered Improve performance of a PostGIS st_dwithin query
Dec
2
comment ST_Project vs ST_Segmentize Postgis
You never say what the big difference you notice is, but I'd be inclined to suspect that, since you're getting close to half the circumference of the earth that the ST_Segmentize version flips around to the shorter great circle path running in the opposite direction. This is expected, given the way the function is written.
Nov
24
answered How do I get back my latitude / longitude after coercion
Nov
18
comment How to unit test distance calculation beetween to points?
See my edit above
Nov
18
revised How to unit test distance calculation beetween to points?
added 434 characters in body