Thanks Dane! That did the trick, i didn't know about ogrinfo. That will make my life a lot easier. -Jamie
On Mon, Oct 27, 2008 at 11:04 PM, Dane Springmeyer <[EMAIL PROTECTED]>wrote: > Hey Jamie, > > I ran ogrinfo on your shapefile to get the extents in UTM and then plugged > those in for the TileCache bbox and OpenLayers extents and the shapefile > symbolized by Mapnik looks great. > > See attached files with only slight modifications based on your testcase. > > The main problem I noticed in your setup was on the OpenLayers side where > you had not zoomed to UTM coordinates and were rather setting the map extent > using lon/lat coordinates. > > Dane > > > > > On Oct 27, 2008, at 12:06 PM, Jamie Robertson wrote: > > Dane- > > Attached are my files and the test shapefile i've been working with. These > files when used with the standard EPSG: 4326 proj strings, omitting the last > 4 lines of the tilecache .cfg, and the shapefile reprojected to GCS_WGS84, > the tiles are rendered correctly. > > When i replace the +proj strings, add the projection/extent info to the > tilecache.cfg, and point to the UTM shapefile, nothing gets rendered—just > the BG color. > > thanks for looking at this! > > -Jamie Robertson > On Mon, Oct 27, 2008 at 10:23 AM, Dane Springmeyer <[EMAIL PROTECTED]>wrote: > >> Jamie, >> Could you post a test case. Ie create a zipped folder with your _full_ >> mapnik.xml, tilecache.cfg, and sample dataset in UTM? >> >> Dane >> >> >> On Oct 27, 2008, at 8:30 AM, Jamie Robertson wrote: >> >> Thanks Chris, i tried adding the *data-extent=* and *bbox=* lines (like >> the googlecode >> example<http://code.google.com/p/mapnik-utils/source/browse/trunk/tutorials/tilecache/tilecache.cfg?r=140>) >> to the tilecache.cfg and am still getting the bg color tiles only. >> >> Could this be a problem with proj4 not being configured properly on my >> machine? >> >> here is my setup with a UTM12N configuration (shp data is already in the >> specified projection): >> >> - *"mapfile.xml": >> * >> >> <?xml version="1.0" encoding="utf-8"?> >> <Map srs="+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs" >> bgcolor="#4682b4"> >> <Style name="base Style"> >> /* STYLE STUFF */ >> </Style> >> <Layer name="base" srs="+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 >> +units=m +no_defs" status="1" clear_label_cache="0"> >> <StyleName>base Style</StyleName> >> <Datasource> >> <Parameter name="file">/mapnik/data/basemap_UTM12N</Parameter> >> <Parameter name="type">shape</Parameter> >> </Datasource> >> </Layer> >> </Map> >> >> what is the difference between setting the Map srs and the Layer srs? >> they should be the same, correct? >> * >> * >> >> - *"tilecache.cfg": * >> >> [base] >> type=Mapnik >> mapfile=/mapnik/python/mapfile.xml >> srs=EPSG:32612 >> projection= +proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs >> data_extent=258102.939, 299699.148, 258642.253, 300018.891 >> bbox=258102.939, 299699.148, 258642.253, 300018.891 >> >> >> - *openlayers js: * >> >> function init() { >> var lon = -113.983; >> var lat = 46.8609; >> var zoom = 17; >> OpenLayers.Feature.Vector.style['default'].cursor = 'pointer'; >> var map = new OpenLayers.Map($('map'), >> { >> controls: [ new OpenLayers.Control.Navigation(), new >> OpenLayers.Control.PanZoomBar() ], >> maxResolution: 360/512, >> projection: "EPSG:32612", >> numZoomLevels: 20, >> minZoomLevel: 17, >> maxZoomLevel: 20 >> } >> >> ); >> -does anything except for the *projection: "EPSG:32612", *line need to be >> set here?* >> >> *Thanks!* >> *-jamie robertson* >> * >> On Fri, Oct 24, 2008 at 2:45 PM, Christopher Schmidt < >> [EMAIL PROTECTED]> wrote: >> >>> On Fri, Oct 24, 2008 at 02:37:34PM -0600, Jamie Robertson wrote: >>> > - When i try this, the tiles (via tilecache.py) are rendered, but >>> the >>> > output is just the bg color, and none of the data is rendered. Do i >>> need to >>> > furthur specify the projection in the *tilecache.cfg* file? such as: >>> >>> you don't need to specify the projection again, but you *do* need to >>> specify the resolution and extents of your data. (extents are a 4-tuple >>> seperated by commas, resolution is typically 'maxresolution=' with a >>> single value: often the equivilant of taking the maximum width of the >>> data and dividing by 512.) >>> >>> To use with OpenLayers, you'll further need to ensure that these >>> settings match between OpenLayers and TileCache. >>> >>> > >>> > [base] >>> > type=Mapnik >>> > mapfile=/mapnik/python/mapfile.xml >>> > srs=EPSG:102700 >>> > projection= +proj=lcc +lat_1=45 +lat_2=49 +lat_0=44.25 +lon_0=-109.5 >>> > +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 >>> > +to_meter=0.3048006096012192 +no_defs >>> > >>> > - I've also tried this procedure with shapefile data that is already >>> in >>> > the UTM12N projection *EPSG: 32612* without success. >>> > >>> > Any ideas? >>> > >>> > Thanks! >>> > >>> > -Jamie Robertson >>> >>> > _______________________________________________ >>> > Mapnik-users mailing list >>> > [email protected] >>> > https://lists.berlios.de/mailman/listinfo/mapnik-users >>> >>> >>> -- >>> Christopher Schmidt >>> MetaCarta >>> >> >> _______________________________________________ >> Mapnik-users mailing list >> [email protected] >> https://lists.berlios.de/mailman/listinfo/mapnik-users >> >> >> > <mapnik_testcase.zip> > > > >
_______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

