Re: [OSM-talk] Borders of the federal states of Germany (again)

2009-05-07 Thread Jukka Rahkonen
Torsten Mohr tmohr at s.netic.de writes:

 
 Hello,
 
 this issue is not related to another post that i did here regarding the
 outline of the world (shoreline_300).
 
 I want to create a map of Germany with many details, especially the
 federal states should have different background colors.
 
 I got a hint already for a ShapeFile that contains these data.  That file
 looked great, but the borderlines defined in there are _much_ more coarse
 than the data in the PostGIS, so creating the background from the
 rough, coarse data does not look that good.  It does not match the
 borders that are drawn.
 
 Is there a way to get the border information from the PostGIS server
 that runs locally on my machine?

Hi,

Import osm data into PostGIS with osm2pgsql utility and query borders with SQL
query like
SELECT * FROM osm_line WHERE admin_level is not null;

At least in the Finnish data excerpt the borders are lines.  For making 
coloured areas border lines must first be converted to polygons.  Last step is
to draw  the states with different colours for example by adding a single value
theme looking at state name etc. All this can be done with OpenJUMP, QGis, uDig,
gvSIG etc.


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


Re: [OSM-talk] Borders of the federal states of Germany (again)

2009-05-07 Thread Torsten Mohr
Hello Jukka,


that looks very interesting!  Thanks a lot!

With a query like:

select * from planet_osm_line where boundary is not null and name like 
'Schleswig%' LIMIT 100; 

I get exactly one entry with heaps of data, seems it represents Schleswig-
Holstein, a federal state.

Seems it needs some refinement, it doesn't seem to work for Bayern
or some others.  But those seem to be in planet_osm_polygon then.


Is there a way to create a ShapeFile from these data?

Or something i can import into QGIS?


Thanks a lot,
Torsten.


Am Donnerstag, 7. Mai 2009 08:15:14 schrieb Jukka Rahkonen:
 Torsten Mohr tmohr at s.netic.de writes:
  Hello,
 
  this issue is not related to another post that i did here regarding the
  outline of the world (shoreline_300).
 
  I want to create a map of Germany with many details, especially the
  federal states should have different background colors.
 
  I got a hint already for a ShapeFile that contains these data.  That file
  looked great, but the borderlines defined in there are _much_ more coarse
  than the data in the PostGIS, so creating the background from the
  rough, coarse data does not look that good.  It does not match the
  borders that are drawn.
 
  Is there a way to get the border information from the PostGIS server
  that runs locally on my machine?

 Hi,

 Import osm data into PostGIS with osm2pgsql utility and query borders with
 SQL query like
 SELECT * FROM osm_line WHERE admin_level is not null;

 At least in the Finnish data excerpt the borders are lines.  For making
 coloured areas border lines must first be converted to polygons.  Last step
 is to draw  the states with different colours for example by adding a
 single value theme looking at state name etc. All this can be done with
 OpenJUMP, QGis, uDig, gvSIG etc.


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


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


Re: [OSM-talk] Borders of the federal states of Germany (again)

2009-05-07 Thread Jukka Rahkonen
Torsten Mohr tmohr at s.netic.de writes:

 
 Hello Jukka,
 
 that looks very interesting!  Thanks a lot!
 
 With a query like:
 
 select * from planet_osm_line where boundary is not null and name like 
 'Schleswig%' LIMIT 100; 
 
 I get exactly one entry with heaps of data, seems it represents Schleswig-
 Holstein, a federal state.
 
 Seems it needs some refinement, it doesn't seem to work for Bayern
 or some others.  But those seem to be in planet_osm_polygon then.
 
 Is there a way to create a ShapeFile from these data?
 
 Or something i can import into QGIS?

Hi,  

QGis and OpenJUMP have native PostGIS drivers so there is no need to import data
into those but you can do all database queries directly from the user interface.
 You can also edit the osm2pgsql defaults to import tags which are not imported
with standard settins.  I believe this could solve also your other problem with
shorelines.  Add tag natural=coastline in the list of features to be imported
and you should have no need to play with the shapefiles any longer.

If you still want to create shapefiles from PostGIS, then ogr2ogr, open source
alternative for the famous FME program, is your tool, . Only thing that it is
missing is a driver for reading osm xml format directly.

-Jukka-



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


[OSM-talk] Borders of the federal states of Germany (again)

2009-05-06 Thread Torsten Mohr
Hello,

this issue is not related to another post that i did here regarding the
outline of the world (shoreline_300).

I want to create a map of Germany with many details, especially the
federal states should have different background colors.

I got a hint already for a ShapeFile that contains these data.  That file
looked great, but the borderlines defined in there are _much_ more coarse
than the data in the PostGIS, so creating the background from the
rough, coarse data does not look that good.  It does not match the
borders that are drawn.

Is there a way to get the border information from the PostGIS server
that runs locally on my machine?

Things i tried so far:
- Google for it
- Get the data from PostGIS with SQL commands
- Download the single federal states from www.geofabrik.de
  as ShapeFiles and then find out they don't contain the borders.
- Download Germany.shp from www.geofabrik.de
  as ShapeFiles and then find out they don't contain the borders.
- Install QGIS and try to get the data from PostGIS (failed as my
  PostGIS installation does not seem to support GEOS).

With the last topic there could still be a chance to get a result, i still
need to try that.  But it means to re-install PostGIS and add some
steps that i'm not yet sure about (GEOS support).


It would be great if anybody had a hint on this.


Thanks for any hints,
Torsten.


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