<HTML dir=ltr><HEAD><TITLE>Re: [OSM-talk] German Shapefile, federal states?</TITLE>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18372"></HEAD>
<BODY>
<DIV dir=ltr id=idOWAReplyText26029>
<DIV dir=ltr><FONT color=#000000 size=3 face="Times New Roman">Hello,<BR><BR></FONT><FONT color=#000000 size=3 face="Times New Roman">Yes, germany.shp is in "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" (used by GPS devices ans by the OSM database), but shoreline_300 is in the spherical mercator projection, which is the projection used by OSM to _render_ the maps because it looks nicer than WGS84 and is widely used.<BR><BR></FONT><FONT color=#000000 size=3 face="Times New Roman">So you either have to reproject germany.shp to spherical mercator (see attached screenshot) or reproject shoreline_300 to WGS84. To do this, you can use FWTools (<A href="http://fwtools.maptools.org">http://fwtools.maptools.org</A>). It includes command-line utilities:<BR><BR></FONT><FONT color=#000000 size=3 face="Times New Roman">ogr2ogr -s_srs epsg:4326 -t_srs "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m <A href="mailto:+nadgrids=@null">+nadgrids=@null</A> +no_defs" germany_sm.shp germany.shp<BR><BR></FONT><FONT color=#000000 size=3 face="Times New Roman">OR<BR><BR></FONT><FONT color=#000000 size=3 face="Times New Roman">ogr2ogr -s_srs "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m <A href="mailto:+nadgrids=@null">+nadgrids=@null</A> +no_defs" -t_srs epsg:4326 shoreline_300_wgs84.shp shoreline_300.shp<BR><BR></FONT><FONT color=#000000 size=3 face="Times New Roman">(as you can see, the last two parameters are not <source> <destination>, but <destination> <source>)<BR><BR></FONT><FONT color=#000000 size=3 face="Times New Roman">The EPSG code for WGS84 is EPSG:4326<BR>The EPSG code for WGS84 is EPSG:900913 or EPSG:3785 (synonyms)<BR><BR></FONT><FONT color=#000000 size=3 face="Times New Roman">Regards,<BR>Juan Lucas</FONT></DIV>
<DIV dir=ltr><FONT color=#000000 size=3 face="Times New Roman"></FONT> </DIV></DIV>
<DIV dir=ltr id=idSignature44424><FONT size=2 face="Courier New"><FONT size=3 face="Times New Roman"></FONT></FONT> </DIV>
<DIV dir=ltr>
<DIV>
<HR tabIndex=-1>
</DIV>
<DIV><FONT size=2 face=Tahoma><B>De:</B> talk-bounces@openstreetmap.org en nombre de Torsten Mohr<BR><B>Enviado el:</B> vie 01/05/2009 10:30<BR><B>Para:</B> OSM Talk<BR><B>Asunto:</B> Re: [OSM-talk] German Shapefile, federal states?<BR></FONT><BR></DIV></DIV>
<DIV>
<P><FONT size=2>Hello Juan,<BR><BR>thanks a lot for that link, it looks like this is exactly what i was searching<BR>for.<BR><BR>Also, the hint to use a program like qgis was great, thanks to all your<BR>hints.<BR><BR>It took me a while to find out that the "scale" of the data in PostGIS and<BR>in shoreline_300 are different to the "scale" in "germany.shp".<BR><BR>QGIS renders both with these settings:<BR>+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs<BR><BR>But the Polygons in "germany" are drawn at lat / lon 0 / 0, on the equator<BR>before Africa.<BR><BR>Do i need to change that settings to make the Polygons match?<BR><BR><BR>> Where do you want to draw that map?<BR>I'm not sure if i understand you corectly, i want to render a huge map of<BR>Germany using the data in PostGIS. But i want to show the federal states<BR>in different colors.<BR><BR><BR>Best regards,<BR>Torsten.<BR><BR><BR>Am Donnerstag, 30. April 2009 21:04:01 schrieb Juan Lucas Dominguez Rubio:<BR>> Hello, Torsten. I think the 16 german federal states (lander) are available<BR>> as a shapefile in lots of different places. Here is one example:<BR>><BR>> <A href="http://wetnet.net/~we7u/xastir/maps/shapefile/Germany/">http://wetnet.net/~we7u/xastir/maps/shapefile/Germany/</A><BR>><BR>> That is a shapefile (compressed) with 16 polygons, and you also have the<BR>> population and extension of each one. You have to open it with some GIS<BR>> application. Where do you want to draw that map?<BR>><BR>> Regards,<BR>> Juan Lucas<BR>><BR>><BR>> ________________________________<BR>><BR>> De: talk-bounces@openstreetmap.org en nombre de Torsten Mohr<BR>> Enviado el: jue 30/04/2009 19:20<BR>> Para: OSM Talk<BR>> Asunto: Re: [OSM-talk] German Shapefile, federal states?<BR>><BR>><BR>><BR>> Ouch, that's bad.<BR>><BR>> i thought they'd contain some actual data, size implied that.<BR>><BR>> I wonder if anybody knows a way to render the 16 German federal states<BR>> (Bundesländer)? Actually that's what i want to do in the end..<BR>><BR>> Is there a way to find out what is in a Shapefile? Like that i can write<BR>> filters like<BR>><BR>> <Filter>[CNTRY_NAME] = 'Germany'</Filter><BR>><BR>> in world_boundaries_m? Is there a way to find this out from a<BR>> Shapefile?<BR>><BR>><BR>> Thanks for any hints,<BR>> Torsten.<BR>><BR>> Am Mittwoch, 29. April 2009 23:06:18 schrieb Frederik Ramm:<BR>> > Hi,<BR>> ><BR>> > Torsten Mohr wrote:<BR>> > > has anybody got some experience with the Shapefiles at:<BR>> > > <A href="http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=760">http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=760</A><BR>> ><BR>> > All I can see are shapefiles that contain a reference grid - no actual<BR>> > geodata?<BR>> ><BR>> > Bye<BR>> > Frederik<BR>><BR>> _______________________________________________<BR>> talk mailing list<BR>> talk@openstreetmap.org<BR>> <A href="http://lists.openstreetmap.org/listinfo/talk">http://lists.openstreetmap.org/listinfo/talk</A><BR><BR><BR>_______________________________________________<BR>talk mailing list<BR>talk@openstreetmap.org<BR><A href="http://lists.openstreetmap.org/listinfo/talk">http://lists.openstreetmap.org/listinfo/talk</A><BR></FONT></P></DIV></BODY></HTML>