Hi Joe,

comments inline...


On Feb 26, 2009, at 2:46 PM, Joe Hildreth wrote:

> Hello all and thank you for allowing me to post. I spent a little time
> on the IRC with these questions and some good information was returned
> to me.
>

Great, welcome to Mapnik.

> Here is my scenario ...
>
> I have two sets of data that I am interested in with most likely two
> separate projects.
>
> 1) I have collected data from the county I live in (Humphreys County,
> Tennessee). I have used this data with JOSM to create the map that I
> want. Following this, I used osm2pgsql to import the data into  
> postgres
> for mapnik to render. I selected a bounding box of the area I wanted
> rendered with a scale of 10-18. (This took a little while.) But it has
> completed.

Sounds good.

>
>
> 2) I have shapefile data from the Army Corps of Engineers containing
> data for the river system. An email asking about projection resulted  
> in
> the following statement:
>
> " ... The charts that are converted to ESRI shapefile
> format are the same projection of the S-57 data:  Geographic  
> projection
> with
> WGS84 spheroid and datum. ..."
>
> The line in the .prj file from the data I have downloaded reads ....
>
> GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984", 
> 6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree", 
> 0.0174532925199433]]
>

Okay, so that is EPSG:4326 aka WGS84 geographic, which is the  
projection that Mapnik's Map and Layer' objects default to. Which  
means that the 'srs' parameter for your layer in Mapnik's xml needs to  
be set to '"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" like: 
http://spatialreference.org/ref/epsg/4326/mapnik/

Note, for OSM data if the Map srs is in mercator and your layer srs is  
in WGS84 then Mapnik will attempt to reproject your data to the Map srs.


> Now please remember, I am as green and new as you can get to this
> activity, but here are my questions.
>
> 1) How can I include the shapefile in my PostGres database to be
> rendered by Mapnik? Does it need to be done outside of the database?

You can do either. You can render the data using the Shapefile plugin  
(available by default in a mapnik build) or you can import it into  
Postgresql (using shp2pgsql or ogr2ogr) and then render it using the  
PostGIS plugin.

>
> 2) When the tiles are rendered, is their a clear example of how to use
> the rendered tiles with OpenLayers? Is TileCache required or  
> optional? I
> have no need to render on demand. (Maybe because ignorance is  
> bliss)  :)
>

If you are using the 'generate_tiles.py' script then you need a  
slightly custom OpenLayers setup to be able to point OpenLayers at the  
tile set.

Here is an example: 
http://mapnik-utils.googlecode.com/svn/example_code/tilecache/generate_tiles_cache.html


NOTE: this example just needs to read the pre-generated tiles off the  
filesystem (likely served by apache). It uses a 'TileCache' layer in  
OpenLayers but that is not the same as using the python server-based  
TileCache software.


> 3) If someone is trying to learn all of these different software  
> layers
> to create maps, where does one go? Google does not seem to bring up a
> lot of resources for newbies?
>

Ask more questions here :)

> 4) Is there a concise guide, FAQ, Tutorial that would explain the  
> steps,
> configurations, or link to information to get a new user involved and
> ramped up the learning curve a bit? Or is this stuff really just
> targeted towards cartographers or something?


Well, there a lots of tutorials and readmes around but because of the  
variety of data sources and projections and needs different users have  
for making maps its difficult to write the 'master' tutorial.

For just getting started with Mapnik and OSM data using shapefiles,  
generate_tiles.py, and a simple OpenLayers map is a good place to be.

Cheers,

Dane

>
> Please don't get me wrong. I am willing to RTFM, but finding it  
> seems to
> be my problem. Can someone shed some light on it for me, please?
>
> Warm Regards,
>
> Joe
>
>
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to