OpenHistoricalMap / osm2pgsql

OpenStreetMap data to PostgreSQL converter
http://wiki.openstreetmap.org/wiki/Osm2pgsql
GNU General Public License v2.0
2 stars 0 forks source link

lua tag transform for dates #3

Open timwaters opened 10 years ago

timwaters commented 10 years ago

https://github.com/openstreetmap/osm2pgsql/blob/591a2f14003620763fe5b7c7851af834fb5b285f/README_lua.md

use lua to transform tags

so from YYYY-MM-DD to a timestamp / large int value

timwaters commented 10 years ago

see recent commit: e501c18a819c199a4909bbc93e74f66f361bf462

lua transforms tries to ensure that dates are in YYYY-MM-DD format, and additionally (because postgres doesnt do very early dates - puts the year 2 new columns, start_date_year and end_date_year.

it doesn't do any sanity checking - just if it's numbers.

we are able to store dates as actual postgres dates.