make consistent the proj4 string used for spherical mercator across tests and docs

This commit is contained in:
Dane Springmeyer 2013-01-28 13:48:13 -05:00
parent 76f202732b
commit 47ab9913ee
26 changed files with 32 additions and 32 deletions

View file

@ -342,7 +342,7 @@ void export_layer()
"'+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' # The default srs if not initialized with custom srs\n"
">>> # set to google mercator with Proj.4 literal\n"
"... \n"
">>> lyr.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 +nadgrids=@null +no_defs +over'\n"
">>> lyr.srs = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over'\n"
)
.add_property("group_by",

View file

@ -470,7 +470,7 @@ void export_map()
"'+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' # The default srs if not initialized with custom srs\n"
">>> # set to google mercator with Proj.4 literal\n"
"... \n"
">>> m.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 +nadgrids=@null +no_defs +over'\n"
">>> m.srs = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over'\n"
)
.add_property("width",

View file

@ -56,8 +56,8 @@ int main ( int argc , char** argv)
using namespace mapnik;
const std::string srs_lcc="+proj=lcc +ellps=GRS80 +lat_0=49 +lon_0=-95 +lat+1=49 +lat_2=77 \
+datum=NAD83 +units=m +no_defs";
const std::string srs_merc="+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 +nadgrids=@null +no_defs";
const std::string srs_merc="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 \
+y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over";
try {
std::cout << " running demo ... \n";

View file

@ -1,5 +1,5 @@
<!DOCTYPE Map>
<Map background-color="#b5d0d0" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs" minimum-version="0.7.2">
<Map background-color="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2">
<Style name="test 1">
<Rule>
<PointSymbolizer file="data/images/dummy.png" allow-overlap="maybe"/>

View file

@ -1,6 +1,6 @@
<!DOCTYPE Map>
<Map background-color="red" minimum-version="0.7.2">
<Layer name="some_layer" status="on" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs">
<Layer name="some_layer" status="on" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<Datasource>
<Parameter name="type">foobar_db</Parameter>
<Parameter name="user">some_one</Parameter>

View file

@ -1,6 +1,6 @@
<!DOCTYPE Map>
<Map background-color="red" minimum-version="0.7.2">
<Layer name="some_layer" status="on" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs">
<Layer name="some_layer" status="on" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<Datasource>
<Parameter name="user">some_one</Parameter>
<Parameter name="password">SECRET</Parameter>

View file

@ -3,7 +3,7 @@
<!ENTITY db_host "/no/socket/here">
]>
<Map background-color="red" minimum-version="0.7.2">
<Layer name="some_layer" status="on" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs">
<Layer name="some_layer" status="on" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<Datasource>
<Parameter name="type">postgis</Parameter>
<Parameter name="host">/no/socket/here</Parameter>

View file

@ -3,7 +3,7 @@
<!ENTITY db_name "gis">
]>
<Map background-color="red" minimum-version="0.7.2">
<Layer name="some_layer" status="on" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs">
<Layer name="some_layer" status="on" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<Datasource>
<Parameter name="type">postgis</Parameter>
<Parameter name="user">foobar</Parameter>

View file

@ -1,5 +1,5 @@
<!DOCTYPE Map>
<Map background-color="#b5d0d0" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs" minimum-version="0.7.2">
<Map background-color="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2">
<Style name="some_style">
<Rule>
<TextSymbolizer size="12" face-name="foobar">[foo]</TextSymbolizer>

View file

@ -1,5 +1,5 @@
<!DOCTYPE Map>
<Map background-color="#b5d0d0" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs" minimum-version="0.7.2">
<Map background-color="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2">
<Style name="some_style">
<Rule>
<PolygonPatternSymbolizer/>

View file

@ -1,5 +1,5 @@
<!DOCTYPE Map>
<Map background-color="#b5d0d0" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs" minimum-version="0.7.2">
<Map background-color="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2">
<Style name="some_style">
<Rule>
<ShieldSymbolizer size="10" fill="#444" file="data/images/dummy.png" face-name="bold">[foo.ttf]</ShieldSymbolizer>

View file

@ -1,5 +1,5 @@
<!DOCTYPE Map>
<Map background-color="#b5d0d0" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs" minimum-version="0.7.2">
<Map background-color="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2">
<Style name="some_style">
<Rule>
<TextSymbolizer size="-5" face-name="bold">[foo.ttf]</TextSymbolizer>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map >
<Map background-color="#b5d0d0" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs">
<Map background-color="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<Style name="some_style">
<Rule>
<Filter>[mapnik:geometry] = 1</Filter>

View file

@ -1,4 +1,4 @@
<Map 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 +nadgrids=@null +wktext +no_defs +over" background-color="steelblue" minimum-version="0.7.2">
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="steelblue" minimum-version="0.7.2">
<Style name="style">
<!-- Asia - default dark color behind light polygon
@ -37,7 +37,7 @@
<PolygonSymbolizer fill="rgb(212,9,14)"/>
</Rule>
</Style>
<Layer name="world" 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 +nadgrids=@null +wktext +no_defs +over">
<Layer name="world" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>style</StyleName>
<Datasource>
<Parameter name="file">../../data/shp/world_merc</Parameter>

View file

@ -1,4 +1,4 @@
<Map 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 +nadgrids=@null +wktext +no_defs +over" background-color="steelblue">
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="steelblue">
<!-- Asia -->
<Style name="style" filter-mode="first">
<Rule>
@ -13,7 +13,7 @@
<PolygonSymbolizer fill="green" fill-opacity=".3"/>
</Rule>
</Style>
<Layer name="world" 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 +nadgrids=@null +wktext +no_defs +over">
<Layer name="world" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>style</StyleName>
<StyleName>style2</StyleName>
<Datasource>

View file

@ -1,5 +1,5 @@
<!DOCTYPE Map>
<Map background-color="#b5d0d0" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs" minimum-version="0.7.2" paths-from-xml="false">
<Map background-color="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2" paths-from-xml="false">
<Style name="test 1">
<Rule>
<Filter>[foo]='bar'</Filter>

View file

@ -1,5 +1,5 @@
<!DOCTYPE Map>
<Map background-color="#b5d0d0" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs" minimum-version="0.7.2" paths-from-xml="false">
<Map background-color="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2" paths-from-xml="false">
<Style name="test 1">
<Rule>
<PointSymbolizer file="../data/images/dummy.png" allow-overlap="true"/>

View file

@ -13,7 +13,7 @@ nik2img.py tests/data/good_maps/bounds_clipping.xml t.png -d 256 256 -e -2003750
+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +towgs84=498.17,136.89,510.08,6.007,4.343,3.831,3.38 +no_defs
--><Map 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 +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2" buffer-size="128" maximum-extent="-20037508.34,-20037508.34,20037508.34,20037508.34">
--><Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2" buffer-size="128" maximum-extent="-20037508.34,-20037508.34,20037508.34,20037508.34">
<Style name="style">
<Rule>

View file

@ -1,4 +1,4 @@
<Map 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 +nadgrids=@null +wktext +no_defs +over" background-color="steelblue" minimum-version="0.7.2">
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="steelblue" minimum-version="0.7.2">
<Style name="base">
<Rule>
<LineSymbolizer stroke-width=".5"/>
@ -39,7 +39,7 @@
</Rule>
</Style>
<Layer name="world" 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 +nadgrids=@null +wktext +no_defs +over">
<Layer name="world" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>style</StyleName>
<StyleName>base</StyleName>
<Datasource>

View file

@ -5,7 +5,7 @@
</Rule>
</Style>
<Layer name="world" 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 +nadgrids=@null +no_defs +over">
<Layer name="world" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>My Style</StyleName>
<Datasource>
<Parameter name="type">shape</Parameter>

View file

@ -1,5 +1,5 @@
<!DOCTYPE Map>
<Map background-color="#b5d0d0" srs="+proj=merc +datum=WGS84 +k=1.0 +units=m +over +no_defs" minimum-version="0.7.2">
<Map background-color="#b5d0d0" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" minimum-version="0.7.2">
<Style name="mapnik:selection">
<Rule>
<Filter>[mapnik:geometry] = 1</Filter>

View file

@ -1,4 +1,4 @@
<Map 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 +nadgrids=@null +wktext +no_defs +over" background-color="steelblue" minimum-version="0.7.2">
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="steelblue" minimum-version="0.7.2">
<Style name="style">
<!-- Asia - default dark color behind light polygon
@ -9,7 +9,7 @@
<PolygonPatternSymbolizer alignment="global" file="../images/stripes_pattern.png"/>
</Rule>
</Style>
<Layer name="world" 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 +nadgrids=@null +wktext +no_defs +over">
<Layer name="world" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>style</StyleName>
<Datasource>
<Parameter name="file">../../data/shp/world_merc</Parameter>

View file

@ -1,4 +1,4 @@
<Map background-color="#fcc" 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 +nadgrids=@null +wktext +no_defs +over">
<Map background-color="#fcc" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<!-- Asia -->
<Style name="style" image-filters="agg-stack-blur(4,4)">
<Rule>
@ -13,7 +13,7 @@
<PolygonSymbolizer fill="#fff"/>
</Rule>
</Style>
<Layer name="world" 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 +nadgrids=@null +wktext +no_defs +over">
<Layer name="world" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>style</StyleName>
<StyleName>style2</StyleName>
<Datasource>

View file

@ -1,4 +1,4 @@
<Map 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 +nadgrids=@null +wktext +no_defs +over" background-color="steelblue" minimum-version="0.7.2">
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="steelblue" minimum-version="0.7.2">
<Style name="labels">
<Rule>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Include xmlns:xi="http://www.w3.org/2001/XInclude">
<Layer name="world_borders" 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 +nadgrids=@null +wktext +no_defs +over">
<Layer name="world_borders" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>world_borders_style</StyleName>
<StyleName>point_style</StyleName>
<Datasource>

View file

@ -3,7 +3,7 @@
<Include xmlns:xi="http://www.w3.org/2001/XInclude">
<Layer name="world_borders" minzoom="&zoom02min;" maxzoom="&zoom00max;" 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 +nadgrids=@null +wktext +no_defs +over">
<Layer name="world_borders" minzoom="&zoom02min;" maxzoom="&zoom00max;" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>world_borders_style</StyleName>
<StyleName>point_style</StyleName>
<Datasource>