I am trying to use NOAA Raster Nautical Charts in Mapnik (file format BSB .kap)
Using Mapnik2 from http://dbsgeo.com/downloads/ on OS X 10.6.6 with the Kyngchaos 1.8 framework distribution. Framework python 2.7.1 python-2.7.1-macosx10.3.dmg from python.org on MacBook Pro Intel core2 duo. When I try to open the file with mapnik2.Gdal I get the following error. >>> mapnik2.Gdal(file = '../data/RNC/BSB_ROOT/11475/11475_1.KAP') --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) /Volumes/SBData/Data/ProSapien/Code/python/gis/gmap/<ipython console> in <module>() /Library/Frameworks/Mapnik.framework/Versions/Current/Python/mapnik2/__init__.py in Gdal(**keywords) 500 if isinstance(keywords['bbox'], (tuple, list)): 501 keywords['bbox'] = ','.join([str(item) for item in keywords['bbox']]) --> 502 return CreateDatasource(keywords) 503 504 def Occi(**keywords): RuntimeError: GDAL Plugin: only 'north up' images are supported I am new to Mapnik so not sure what to do here. Don't know what 'North Up' means for raster data. (see gdalinfo output below)The bounding box sides are not parallel to meridians. Is that the problem. How do I use data like this in mapnik. You can find the source data file here http://dl.dropbox.com/u/27709390/11475_1.KAP.zip I have no problem opening it with osgeo.gdal x = osgeo.gdal.Open('../data/RNC/BSB_ROOT/11475/11475_1.KAP') >>> x <osgeo.gdal.Dataset; proxy of <Swig Object of type 'GDALDatasetShadow *' at 0x6d205a8> > >>> x.GetMetadata() {'BSB_KNP': 'SC=10000,GD=NAD83,PR=MERCATOR,PP=-27.467,PI=1.000,SP=,SK=23.0094444,TA=113.0094444,UN=FEET,SD=MEAN LOWER LOW WATER,DX=1.00,DY=1.00', 'BSB_KNQ': 'EC=RF,GD=NARC,VC=UNKNOWN,SC=MLLW,PC=MC,P1=UNKNOWN,P2=27.467,P3=NOT_APPLICABLE,P4=NOT_APPLICABLE,GC=FC,RM=POLYNOMIAL'} ------------------- $ gdalinfo ../data/RNC/BSB_ROOT/11475/11475_1.KAP Driver: BSB/Maptech BSB Nautical Charts Files: /Volumes/SBData/Data/ProSapien/Code/python/gis/data/RNC/BSB_ROOT/11475/11475_1.KAP Size is 9302, 5466 Coordinate System is: PROJCS["Global Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["degree",0.01745329251994328]], PROJECTION["Mercator_2SP"], PARAMETER["standard_parallel_1",0], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-80], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["Meter",1]] GeoTransform = -38497.14380813999, 1.03652513991192, 0.4404105893482734 3164047.608337388, 0.4404128076727901, -1.036565301911081 GCP Projection = PROJCS["Global Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["degree",0.01745329251994328]], PROJECTION["Mercator_2SP"], PARAMETER["standard_parallel_1",0], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-80], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["Meter",1]] GCP[ 0]: Id=GCP_1, Info= (246,4980) -> (-36048.343329415,3158993.55993248,0) GCP[ 1]: Id=GCP_2, Info= (247,1614) -> (-37530.1294389589,3162483.06468361,0) GCP[ 2]: Id=GCP_3, Info= (8826,1618) -> (-28635.7021245771,3166258.15841861,0) GCP[ 3]: Id=GCP_4, Info= (8827,4981) -> (-27153.9160150316,3162771.49925093,0) GCP[ 4]: Id=GCP_5, Info= (8175,4981) -> (-27829.8726983195,3162484.45137226,0) GCP[ 5]: Id=GCP_6, Info= (8797,3518) -> (-27829.8726983195,3164275.13277553,0) GCP[ 6]: Id=GCP_7, Info= (8827,3447) -> (-27829.8726983195,3164362.15930668,0) GCP[ 7]: Id=GCP_8, Info= (6385,4981) -> (-29685.1975485854,3161696.48752626,0) GCP[ 8]: Id=GCP_9, Info= (6558,4574) -> (-29685.1975485854,3162194.63622856,0) GCP[ 9]: Id=GCP_10, Info= (7280,2874) -> (-29685.1975485854,3164275.13277553,0) GCP[ 10]: Id=GCP_11, Info= (7814,1617) -> (-29685.1975485854,3165812.5679378,0) GCP[ 11]: Id=GCP_12, Info= (4595,4981) -> (-31540.2131755685,3160908.22265026,0) GCP[ 12]: Id=GCP_13, Info= (5042,3930) -> (-31540.5223877183,3162194.63622856,0) GCP[ 13]: Id=GCP_14, Info= (5764,2230) -> (-31540.5223877183,3164275.13277553,0) GCP[ 14]: Id=GCP_15, Info= (6025,1617) -> (-31540.2131755685,3165025.10480227,0) GCP[ 15]: Id=GCP_16, Info= (2805,4981) -> (-33395.8472379828,3160120.3500198,0) GCP[ 16]: Id=GCP_17, Info= (3526,3285) -> (-33395.8472379828,3162194.982884,0) GCP[ 17]: Id=GCP_18, Info= (4235,1616) -> (-33395.8472379828,3164237.68726689,0) GCP[ 18]: Id=GCP_19, Info= (1015,4981) -> (-35251.1720882487,3159331.82978716,0) GCP[ 19]: Id=GCP_20, Info= (1287,4341) -> (-35251.1720882487,3160114.80422911,0) GCP[ 20]: Id=GCP_21, Info= (2009,2641) -> (-35251.1720882487,3162194.982884,0) GCP[ 21]: Id=GCP_22, Info= (2445,1615) -> (-35251.1720882487,3163450.31530435,0) GCP[ 22]: Id=GCP_23, Info= (247,2577) -> (-37106.4969273817,3161484.68452413,0) GCP[ 23]: Id=GCP_24, Info= (493,1997) -> (-37106.4969273817,3162194.982884,0) GCP[ 24]: Id=GCP_25, Info= (656,1615) -> (-37106.1877152318,3162662.64221996,0) GCP[ 25]: Id=GCP_26, Info= (2794,4981) -> (-33407.9068457749,3160115.15084408,0) GCP[ 26]: Id=GCP_27, Info= (247,3899) -> (-36524.5433758371,3160115.15084408,0) GCP[ 27]: Id=GCP_28, Info= (7517,4981) -> (-28512.0138027092,3162194.982884,0) GCP[ 28]: Id=GCP_29, Info= (247,1892) -> (-37407.9872223679,3162194.63622856,0) GCP[ 29]: Id=GCP_30, Info= (8827,3531) -> (-27792.7662050976,3164274.78605461,0) GCP[ 30]: Id=GCP_31, Info= (4320,1616) -> (-33308.0285273428,3164274.78605461,0) Metadata: BSB_KNP=SC=10000,GD=NAD83,PR=MERCATOR,PP=-27.467,PI=1.000,SP=,SK=23.0094444,TA=113.0094444,UN=FEET,SD=MEAN LOWER LOW WATER,DX=1.00,DY=1.00 BSB_KNQ=EC=RF,GD=NARC,VC=UNKNOWN,SC=MLLW,PC=MC,P1=UNKNOWN,P2=27.467,P3=NOT_APPLICABLE,P4=NOT_APPLICABLE,GC=FC,RM=POLYNOMIAL Corner Coordinates: Upper Left ( -38497.144, 3164047.608) ( 80d20'44.97"W, 27d28'53.45"N) Lower Left ( -36089.860, 3158381.742) ( 80d19'27.12"W, 27d26'10.00"N) Upper Right ( -28855.387, 3168144.328) ( 80d15'33.16"W, 27d30'51.59"N) Lower Right ( -26448.103, 3162478.462) ( 80d14'15.31"W, 27d28' 8.19"N) Center ( -32472.623, 3163263.035) ( 80d17'30.14"W, 27d28'30.82"N) Band 1 Block=9302x1 Type=Byte, ColorInterp=Palette Color Table (RGB with 9 entries) 0: 0,0,0,255 1: 255,255,255,255 2: 219,73,150,255 3: 150,176,155,255 4: 114,114,114,255 5: 214,219,201,255 6: 239,216,163,255 7: 244,232,193,255 8: 209,221,239,255 ********************************************************************** Samuel M. Smith Ph.D. 242 East 600 North, Lindon Utah 84042-1662 USA 801-768-2768 voice 801-768-2769 fax ********************************************************************** "The greatest source of failure and unhappiness in the world is giving up what we want most for what we want at the moment" ********************************************************************** _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

