News for hackers. Stuff that matters.
Re:Postgres geography type is not limited to Earth by mooneater on Sunday August 20, 2017 @07:05PM (#15060685)
Giving credit where due -- postGIS depends on Proj4 for coordinate projections: http://trac.osgeo.org/proj/
Re:Postgres geography type is not limited to Earth by ringshall on Monday August 21, 2017 @07:23AM (#15063690)
Which is why other projects that depend on Proj4, such as QGIS, also work with projections for various celestial bodies.
Re:Postgres geography type is not limited to Earth by askvictor on Sunday August 20, 2017 @08:36PM (#15061094)
This is awesome. Purely out of interest, how would one go about a similar location database for arbitrary locations in space? PostGIS presumably assumes a spheroid planet; what if I'm tracking objects in interplanetary space? Are there any DB plugins (accessible outside of national space agencies) that can do that?
Re:Postgres geography type is not limited to Earth by bad_alloc on Sunday August 20, 2017 @08:54PM (#15061157)
> what if I'm tracking objects in interplanetary space?

I guess you'd just want to store the orbital information of that object, as it probably won't stay at a fixed position.

Re:Postgres geography type is not limited to Earth by askvictor on Sunday August 20, 2017 @09:16PM (#15061256)
Indeed; does that mean such a database would need to run an n-body simulation to determine where one object is compared to another at a given time?
Re:Postgres geography type is not limited to Earth by Demiurge on Monday August 21, 2017 @02:51AM (#15062459)
That would require arbitrary telemetry and possibly non-deterministic solution, or something like SPICE(https://naif.jpl.nasa.gov/naif/toolkit.html) which is a bit too far outside of 'database' domain.
Re:Postgres geography type is not limited to Earth by pjc50 on Monday August 21, 2017 @06:12AM (#15063363)
http://tdc-www.harvard.edu/catalogs/sao.html

Sensibly, the star catalog is arranged by apparent position from Earth. There are two kinds of motion that need to be accounted for: the precession of the earth, which affects all coordinates uniformly ( http://www.stargazing.net/kepler/b1950.html ) and "proper motion" of the stars themselves: https://en.wikipedia.org/wiki/Proper_motion

Proper motion is rather slow. Fortunately astronomy can take measurements across the centuries.

"Proper motion was suspected by early astronomers (according to Macrobius, AD 400) but a proof was not provided until 1718 by Edmund Halley, who noticed that Sirius, Arcturus and Aldebaran were over half a degree away from the positions charted by the ancient Greek astronomer Hipparchus roughly 1850 years earlier."

Re:Postgres geography type is not limited to Earth by b34r on Monday August 21, 2017 @04:13AM (#15062795)
X, y, z
Re:Postgres geography type is not limited to Earth by matthewrudy on Monday August 21, 2017 @05:05AM (#15063027)
Spatialreference.org is a great resource for finding these coordinate systems.

For example, in Korea a bunch of mapping providers use "UTM-K", which is some custom UTM projection

(defined such that coordinate [1_000_000, 2_000_000] is some point in the mountains in the north of South Korea (38.0, 127.5 lat/lon))

Just search UTM-K on spatialreference, http://spatialreference.org/ref/sr-org/7308/

And you get the magic postgis incantation http://spatialreference.org/ref/sr-org/7308/postgis/

Then just set the srid and everything should work nicely.

Re:Postgres geography type is not limited to Earth by Antrikshy on Sunday August 20, 2017 @06:56PM (#15060648)
You mean PostGIS*, which appears to be an add-on for Postgres.
Re:Postgres geography type is not limited to Earth by ianai on Sunday August 20, 2017 @07:31PM (#15060799)
Yes but the ability to have this add on is a deep feature of Postgresql missing from other RDBMS
Re:Postgres geography type is not limited to Earth by nimchimpsky on Sunday August 20, 2017 @11:46PM (#15061779)
its not missing from sql server, or oracle.
Re:Postgres geography type is not limited to Earth by nodesocket on Monday August 21, 2017 @12:22AM (#15061906)
Geo/GIS is an area where SQL Server and Oracle have a solid lead over MySQL and PostgreSQL. Oracle especially handles GIS data extremely well.
Re:Postgres geography type is not limited to Earth by vetinari on Monday August 21, 2017 @06:08AM (#15063341)
Oracle Spatial isn't that different, compared to PostGIS. Except for license fees, of course.

Meanwhile, they both are missing the concept of spatial contexts.

Re:Postgres geography type is not limited to Earth by anc84 on Monday August 21, 2017 @05:20AM (#15063114)
Benchmarks and proof on Oracle handling GIS data better than PostGIS please.
Re:Postgres geography type is not limited to Earth by nimchimpsky on Monday August 21, 2017 @08:34AM (#15064071)
sql server does. We benchmarked it at work.

If you are that interested do your own tests.

Re:Postgres geography type is not limited to Earth by anc84 on Monday August 21, 2017 @09:08AM (#15064255)
Good for you but I did not ask for stranger's anecdotes. Everything I find online does not support your point so I cannot take your word for it.
Re:Postgres geography type is not limited to Earth by nimchimpsky on Monday August 21, 2017 @09:56PM (#15069173)
I'm not asking you to take my word for it, I'm suggesting you test it yourself using your typical use case.
Re:Postgres geography type is not limited to Earth by anc84 on Tuesday August 22, 2017 @07:01AM (#15071212)
And I have neither the time nor the resources to do that comprehensively.
Re:Postgres geography type is not limited to Earth by haskal on Monday August 21, 2017 @03:29PM (#15067088)
For a person who is relying on benchmarks, you should know that benchmarks are only a rough indication of how well anything performs for a very specific use case.

Your reply is arrogant and ignorant, and you should feel bad about typing that.

> If you are that interested do your own tests.

Why is he not allowed to review your results or check what factors you benchmarked it on? If there's no citation, that claim does not stand.

Re:Postgres geography type is not limited to Earth by nimchimpsky on Monday August 21, 2017 @09:52PM (#15069158)
lol
Re:Postgres geography type is not limited to Earth by chillydawg on Monday August 21, 2017 @08:07AM (#15063923)
To be fair, Oracle is usually extremely good at most of the stuff it does. I've no idea about GIS specifically, but, generally, you get what you pay for.
Re:Postgres geography type is not limited to Earth by sangnoir on Monday August 21, 2017 @01:18PM (#15066026)
> I've no idea about GIS specifically, but, generally, you get what you pay for.

That's a fascinating/contrary, albeit nebulous thing to say in a thread about Postgres...

Re:Postgres geography type is not limited to Earth by adamnemecek on Sunday August 20, 2017 @07:26PM (#15060770)
I'm being nitpicky but "geography" means "description of Earth" so if we aren't talking about Earth it's not geography anymore :-). The word might be topography?
Re:Postgres geography type is not limited to Earth by polemic on Sunday August 20, 2017 @07:44PM (#15060864)
TIL Areography!

https://en.wiktionary.org/wiki/areography

> "The scientific study of the planet Mars' geographical features;"

Wait, theres that word again...

Also Topography refers to physical features whereas Geography is much more broad. Funny that there doesn't seem to be a single word for it.

Re:Postgres geography type is not limited to Earth by falcor84 on Sunday August 20, 2017 @11:00PM (#15061619)
Ha, I personally always assumed that "earth" in this context refers to land/soil. Could anyone familiar with the Greek root let me know if that works in the original?
Re:Postgres geography type is not limited to Earth by Someone on Sunday August 20, 2017 @11:33PM (#15061730)
Yes, it does. https://en.wiktionary.org/wiki/γῆ#Ancient_Greek:

"γῆ • (gê) f (genitive γῆς); first declension

1. land, earth 2. country 3.soil"

Re:Postgres geography type is not limited to Earth by thaumasiotes on Monday August 21, 2017 @03:10AM (#15062528)
You can do better than that for a source. http://www.perseus.tufts.edu/hopper/text?doc=Perseus%3Atext%... :

I. earth opp. to heaven, or land opp. to sea; κατὰ γῆν on land, by land

2. earth, as an element, opp. to air, water, fire

II. a land, country; γῆν πρὸ γῆς from land to land

III. the earth or ground as tilled

IV. a lump of earth, in the phrase γῆν καὶ ὕδωρ αἰτεῖν, γῆν καὶ ὕδωρ διδόναι, in token of submission

http://www.perseus.tufts.edu/hopper/text?doc=Perseus%3Atext%... is a much more detailed, less quotable dictionary entry.

As you can see, the greek word refers equally well to the planet (sense I, "the earth, including land and sea, in contrast to heaven") and the dirt (senses 2, III, and IV), just like the english word.

Re:Postgres geography type is not limited to Earth by ygra on Monday August 21, 2017 @06:28AM (#15063431)
So it only breaks down on gas giants ;-)
Re:Postgres geography type is not limited to Earth by adamnemecek on Sunday August 20, 2017 @11:34PM (#15061736)
I'm guessing it's Earth not earth since there's areography, I.e. "Geography of Mars".
Re:Postgres geography type is not limited to Earth by thaumasiotes on Monday August 21, 2017 @03:15AM (#15062548)
That's just someone being cute in a space where it's relatively convenient. You're not going to find people discussing "aphroditography" for Venus.
Re:Postgres geography type is not limited to Earth by Someone on Sunday August 20, 2017 @11:30PM (#15061720)
And "geometry" means "measurement of earth" so maybe we should call it topometry? :-) (https://en.wiktionary.org/wiki/topometry)
Re:Postgres geography type is not limited to Earth by Asooka on Monday August 21, 2017 @05:09AM (#15063053)
We also do geometry on space and on things that do not and cannot exist in reality. Maybe it should be unimetry :)
Re:Postgres geography type is not limited to Earth by brennankreiman on Sunday August 20, 2017 @11:25PM (#15061706)
Phil Stooke has an interesting method for modeling small space objects, would be interesting to apply a non-spherical coordinate system. http://publish.uwo.ca/~pjstooke/plancart.htm
Re:Postgres geography type is not limited to Earth by EGreg on Monday August 21, 2017 @01:32AM (#15062178)
I just stick to using geohash with regular indexes. Luckily it has no patents around it.