[OSM-dev] osm2pgsql and timestamp as data in Postgres?

2013-07-09 Thread Stefan Keller
Hi,

Did anyone manage to configure osm2pgsql in order that it stores also
the timestamp XML attribute in Postgres - either as separate field or
as key/value in the hstore field? If yes, how can I do that?

Yours, Stefan

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osm2pgsql and timestamp as data in Postgres?

2013-07-09 Thread Paul Norman
 From: Stefan Keller [mailto:sfkel...@gmail.com]
 Subject: [OSM-dev] osm2pgsql and timestamp as data in Postgres?
 
 Hi,
 
 Did anyone manage to configure osm2pgsql in order that it stores also
 the timestamp XML attribute in Postgres - either as separate field or as
 key/value in the hstore field? If yes, how can I do that?

The -x|--extra-attributes option will include this metadata. You may want to
add the columns to your .style file, and you will need to if you're not
using hstore.


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osm2pgsql and timestamp as data in Postgres?

2013-07-09 Thread Stefan Keller
Hi Paul

2013/7/9 Paul Norman penor...@mac.com wrote:
 The -x|--extra-attributes option will include this metadata. You may want to
 add the columns to your .style file, and you will need to if you're not
 using hstore.

Thanks for your reply. That's what we're already doing:

osm2pgsql --create --slim --extra-attributes --database $DB_NAME \
   --prefix osm --style /usr/local/share/osm2pgsql/terminal.style \
   --username $DB_USER --port $DB_PORT --hstore-all --input-reader pbf \
   $OSRM_BIN_DIRECTORY/$(basename $CH_OSM_URL)
   /dev/null

Unfortunately, the hstore field contains e.g. osm_id, osm_version -
but no timestamp!

Yours, Stefan

2013/7/9 Paul Norman penor...@mac.com:
 From: Stefan Keller [mailto:sfkel...@gmail.com]
 Subject: [OSM-dev] osm2pgsql and timestamp as data in Postgres?

 Hi,

 Did anyone manage to configure osm2pgsql in order that it stores also
 the timestamp XML attribute in Postgres - either as separate field or as
 key/value in the hstore field? If yes, how can I do that?

 The -x|--extra-attributes option will include this metadata. You may want to
 add the columns to your .style file, and you will need to if you're not
 using hstore.


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osm2pgsql and timestamp as data in Postgres?

2013-07-09 Thread Simon Poole
I believe there is a bug that the timestamps don't get imported from
.pbf files. Should work fine with xml.

Simon

Am 09.07.2013 12:21, schrieb Stefan Keller:
 Hi Paul

 2013/7/9 Paul Norman penor...@mac.com wrote:
 The -x|--extra-attributes option will include this metadata. You may want to
 add the columns to your .style file, and you will need to if you're not
 using hstore.
 Thanks for your reply. That's what we're already doing:

 osm2pgsql --create --slim --extra-attributes --database $DB_NAME \
--prefix osm --style /usr/local/share/osm2pgsql/terminal.style \
--username $DB_USER --port $DB_PORT --hstore-all --input-reader pbf \
$OSRM_BIN_DIRECTORY/$(basename $CH_OSM_URL)
/dev/null

 Unfortunately, the hstore field contains e.g. osm_id, osm_version -
 but no timestamp!

 Yours, Stefan

 2013/7/9 Paul Norman penor...@mac.com:
 From: Stefan Keller [mailto:sfkel...@gmail.com]
 Subject: [OSM-dev] osm2pgsql and timestamp as data in Postgres?

 Hi,

 Did anyone manage to configure osm2pgsql in order that it stores also
 the timestamp XML attribute in Postgres - either as separate field or as
 key/value in the hstore field? If yes, how can I do that?
 The -x|--extra-attributes option will include this metadata. You may want to
 add the columns to your .style file, and you will need to if you're not
 using hstore.

 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev



___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osm2pgsql and timestamp as data in Postgres?

2013-07-09 Thread Stefan Keller
Hi Simon

2013/7/9 Simon Poole si...@poole.ch:
 I believe there is a bug that the timestamps don't get imported from
 .pbf files. Should work fine with xml.

We opened a ticket here https://trac.openstreetmap.org/ticket/4894

Yours, Stefan


2013/7/9 Simon Poole si...@poole.ch:
 I believe there is a bug that the timestamps don't get imported from
 .pbf files. Should work fine with xml.

 Simon

 Am 09.07.2013 12:21, schrieb Stefan Keller:
 Hi Paul

 2013/7/9 Paul Norman penor...@mac.com wrote:
 The -x|--extra-attributes option will include this metadata. You may want to
 add the columns to your .style file, and you will need to if you're not
 using hstore.
 Thanks for your reply. That's what we're already doing:

 osm2pgsql --create --slim --extra-attributes --database $DB_NAME \
--prefix osm --style /usr/local/share/osm2pgsql/terminal.style \
--username $DB_USER --port $DB_PORT --hstore-all --input-reader pbf \
$OSRM_BIN_DIRECTORY/$(basename $CH_OSM_URL)
/dev/null

 Unfortunately, the hstore field contains e.g. osm_id, osm_version -
 but no timestamp!

 Yours, Stefan

 2013/7/9 Paul Norman penor...@mac.com:
 From: Stefan Keller [mailto:sfkel...@gmail.com]
 Subject: [OSM-dev] osm2pgsql and timestamp as data in Postgres?

 Hi,

 Did anyone manage to configure osm2pgsql in order that it stores also
 the timestamp XML attribute in Postgres - either as separate field or as
 key/value in the hstore field? If yes, how can I do that?
 The -x|--extra-attributes option will include this metadata. You may want to
 add the columns to your .style file, and you will need to if you're not
 using hstore.

 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev



 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev

___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] osm2pgsql and timestamp as data in Postgres?

2013-07-09 Thread Simon Poole
If I remember correctly the relevant code is simply missing from  the
.pbf parser.

Simon

Am 09.07.2013 16:26, schrieb Stefan Keller:
 Hi Simon

 2013/7/9 Simon Poole si...@poole.ch:
 I believe there is a bug that the timestamps don't get imported from
 .pbf files. Should work fine with xml.

 We opened a ticket here https://trac.openstreetmap.org/ticket/4894

 Yours, Stefan


 2013/7/9 Simon Poole si...@poole.ch:
 I believe there is a bug that the timestamps don't get imported from
 .pbf files. Should work fine with xml.

 Simon

 Am 09.07.2013 12:21, schrieb Stefan Keller:
 Hi Paul

 2013/7/9 Paul Norman penor...@mac.com wrote:
 The -x|--extra-attributes option will include this metadata. You
may want to
 add the columns to your .style file, and you will need to if you're not
 using hstore.
 Thanks for your reply. That's what we're already doing:

 osm2pgsql --create --slim --extra-attributes --database $DB_NAME \
--prefix osm --style /usr/local/share/osm2pgsql/terminal.style \
--username $DB_USER --port $DB_PORT --hstore-all
--input-reader pbf \
$OSRM_BIN_DIRECTORY/$(basename $CH_OSM_URL)
/dev/null

 Unfortunately, the hstore field contains e.g. osm_id, osm_version -
 but no timestamp!

 Yours, Stefan

 2013/7/9 Paul Norman penor...@mac.com:
 From: Stefan Keller [mailto:sfkel...@gmail.com]
 Subject: [OSM-dev] osm2pgsql and timestamp as data in Postgres?

 Hi,

 Did anyone manage to configure osm2pgsql in order that it stores also
 the timestamp XML attribute in Postgres - either as separate field
or as
 key/value in the hstore field? If yes, how can I do that?
 The -x|--extra-attributes option will include this metadata. You
may want to
 add the columns to your .style file, and you will need to if you're not
 using hstore.

 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev



 ___
 dev mailing list
 dev@openstreetmap.org
 http://lists.openstreetmap.org/listinfo/dev


___
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev