gem / openquake-server

DEPRECATED. Please refer to https://github.com/gem/oq-engine
6 stars 1 forks source link

Use standard lon,lat / lat,lon order #16

Closed larsbutler closed 13 years ago

larsbutler commented 13 years ago

Hi,

I'd just like to start some discussion on this issue.

In our job config files (config.gem), the order of coordinate values in the REGION_VERTEX is (lat, lon). (Historically, I believe this is because OpenSHA-lite uses (lat, lon) in the Location class.

However, in most--if not all--other places (including our NRML XML files), the coordinate order is (lon, lat). Currently, this is dealt with by swapping the order of the coordinates when the job config is read: https://github.com/gem/openquake/blob/master/openquake/job/__init__.py#L197

Given the above fact, it is likely that region constraints defined for a calculation in the GUI will be ordered (lon, lat), which apparently follows some GIS standard (TODO: I don't which standard this is; we need find out and document it). So, in order to generate a config file, we need to flip the order of the coordinates, and when the job is read, we need to flip them again.

This is rather confusing and makes our system more error prone, in my opinion.

larsbutler commented 13 years ago

Woops, wrong repository. =P