Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgis spatial reference ID (srid) = 4326, linestring endpoints do not look like latlong #17

Open
rbracket opened this issue Dec 9, 2014 · 1 comment

Comments

@rbracket
Copy link

rbracket commented Dec 9, 2014

I would expect to see lat long from this query, instead saw feet?

SELECT
st_asewkt(osm_ways.geometry)
FROM
public.osm_ways limit 1;

"SRID=4326;LINESTRING(565378.109016 4187349.703712,565377.378041 4187339.811519)"

details: script was spiderosm_berkeley.py..
with this config file:
{
"gis_data_dir" : "/home/GISData/",
"out_dir" : "/home/katie/Berkeley/",
"postgis_enabled" : true,
"postgis_dbname" : "berkeley",
"postgis_user" : "postgres",
"postgis_password" : "******",
"postgis_port" : 5432,
"spatialite_enabled" : false
}

..logging notes.....
Reading /home/katie/.spiderosm.json
Reading ./config.spiderosm.json
=== 2014-12-09 11:36:25, spiderosm 0.3.6, init, INFO:
config.info: {u'version': u'0.3.6', 'sys.version': '2.7.3 (default, Feb 27 2014, 20:00:17) \n[GCC 4.6.3]', u'license': u'MIT', u'author': u'Michael Arnold', u'author_email': u'[email protected]', 'sys.platform': 'linux2', u'homepage': u'http://spiderosm.org', 'os.name': 'posix', 'package_dir': '/usr/local/lib/python2.7/dist-packages/spiderosm'}
=== 2014-12-09 11:36:25, spiderosm 0.3.6, init, INFO:
config.settings: {u'postgis_dbname': u'berkeley', u'out_dir': u'/home/katie/Berkeley/', 'spatialite_enabled': False, u'gis_data_dir': u'/home/GISData/', 'spiderosm_test_data_dir': '/usr/local/lib/python2.7/dist-packages/spiderosm/test_data', 'postgis_enabled': True, u'postgis_port': 5432, u'postgis_user': u'postgres', u'postgis_password': u'tualatin', 'spiderosm_dir': '/usr/local/lib/python2.7/dist-packages/spiderosm'}

@mharnold
Copy link
Owner

Good point! OSM data is generally in lat-long, which only makes sense due to it's seamless world wide extent. So it makes sense to expect osm_ways, and osm_nodes to be in lat-long.

Path networks, including osm_pnwk are in planar coordinates since distances (in either feet or meters) are fundamental to the processing. The projection of OSM data from lon/lat to planar is currently done 'up front', but probably would make more sense to do this at the osm.geojson -> osm_pnwk.geojson step.

Thanks for pointing this out. I am currently expanding the documentation (and handling) of spatial reference systems in spiderosm. I'll be sure and at least document that osm.geojson and related database tables are in planar coordinates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants