Skip to content
Permalink
Browse files
mapserver export plugin always defaulted to epsg:4326 in mapfile beca…
…use code still used old elementnames (epsg) instead of new (srid) in .qgs files

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13717 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rduivenvoorde committed Jun 12, 2010
1 parent 43e0aff commit 01b5577e2b8a8c34abefa536df36cadffe12b430
Showing with 3 additions and 3 deletions.
  1. +3 −3 python/plugins/mapserver_export/ms_export.py
@@ -284,7 +284,7 @@ def getExtentString(self):
stringToAddTo = ""

xmin = self.qgs.getElementsByTagName("xmin")
stringToAddTo += " EXTENT "
stringToAddTo += " EXTENT "
stringToAddTo += xmin[0].childNodes[0].nodeValue.encode('utf-8')
stringToAddTo += " "

@@ -383,7 +383,7 @@ def writeWebSection(self):

destsrs = self.qgs.getElementsByTagName("destinationsrs")[0]
try:
epsg = destsrs.getElementsByTagName("epsg")[0].childNodes[0].nodeValue.encode("utf-8")
epsg = destsrs.getElementsByTagName("srid")[0].childNodes[0].nodeValue.encode("utf-8")
except:
# default to epsg
epsg="4326"
@@ -634,7 +634,7 @@ def writeMapLayers(self):
def getEpsg(self, lyr):
try:
srs = lyr.getElementsByTagName('srs')[0].getElementsByTagName('spatialrefsys')[0]
return srs.getElementsByTagName('epsg')[0].childNodes[0].nodeValue.encode('utf-8')
return srs.getElementsByTagName('srid')[0].childNodes[0].nodeValue.encode('utf-8')
except:
#Use 4326 as a sensible default if the above fails
return "4326"

0 comments on commit 01b5577

Please sign in to comment.