[Mapnik-users] How to render maps in different projections

Artem Pavlenko artem at pavlenko.uklinux.net
Thu Nov 30 22:12:47 CET 2006


Hi Martin,

>   Thanks a lot, it works great, I have some problems
>   with strange lines from the projection center to
>   the sphere's border (orthogonal projection) but thats
>   off topic here I guess.
>
>   Is there a simple way to render grid-lines (lines of
>   equal lat, lon) to visualize the projection?
>   

Well, you'll need to create your own or google for graticule or grid or 
something like that. If I remember correctly Sean Gilles 
(http://zcologia.com/news) and Matt Perry (http://perrygeo.org) both 
have written about it in the past.

Cheers,
Artem.

> --
> Regards
> Martin
>
>   
>> Jean-François Doyon wrote
>> The SVN version of Mapnik supports projections.
>>
>> You declare them with the .srs property on Map() and Layer() objects.
>>
>> map.srs = Projection('+init=epsg:42304')
>>
>> That string is in the PROJ.4 format.  PROJ.4 is the library used for 
>> reprojections: http://proj.maptools.org/
>>
>> The default projection is Lat/Long (Geographic).
>>
>> No need to mess with your shapefiles, so long as you know the 
>> projection used for the coordinates in the data, just attach the 
>> projection to definition to the layer object.  Define the output 
>> projection on the Map object.
>>
>> Cheers,
>> J.F.
>>
>>
>> Martin Morawetz wrote:
>>     
>>> Hallo,
>>>
>>> I played with the tutorial examples from your website and
>>> I really like the output.
>>>
>>> Now my question: Is there a way to change the projection
>>> using mapnik (In some blog I red that mapnik doesn't
>>> support projections)?
>>>
>>> If not, how could I achieve different projections, maybe
>>> using other tools to prepare the inputfiles?
>>>
>>>  From what I red about ESRI shapeformat it doesn't
>>> contain any projection-information.
>>>
>>> So would that be a way to accomplish it:
>>> Converting the shape-file (with grass?) to some raster format
>>> that mapnik understands, change the projection (with gdalwarp?),
>>> and using the warped file as input for mapnik?
>>>
>>> What is the default projection mapnik uses?
>>>
>>> Is there some way to render grid-lines to visualize
>>> the projection?
>>>
>>> I'm new to gis (which turned out to be a very very big
>>> subject) so maybe my questions are very newbish,
>>> anyway maybe you could toss me into the right direction.
>>>
>>> --
>>> Greetings
>>> Martin
>>>
>>>
>>> --
>>>
>>> --
>>> +---------------------------------------------+
>>> | This email was sent using Frederick Webmail |
>>> |      http://www.phpguru.org/frederick/      |
>>> +---------------------------------------------+
>>>
>>> _______________________________________________
>>> Mapnik-users mailing list
>>> Mapnik-users at lists.berlios.de
>>> https://lists.berlios.de/mailman/listinfo/mapnik-users
>>>
>>>
>>>       
>
> _______________________________________________
> Mapnik-users mailing list
> Mapnik-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/mapnik-users
>
>
>   



More information about the Mapnik-users mailing list