Skip to content

Commit

Permalink
mapserver export plugin always defaulted to epsg:4326 in mapfile beca…
Browse files Browse the repository at this point in the history
…use code still used old elementnames (epsg) instead of new (srid) in .qgs files

git-svn-id: http://svn.osgeo.org/qgis/trunk@13717 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rduivenvoorde committed Jun 12, 2010
1 parent 4fe3c89 commit a64a81a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/plugins/mapserver_export/ms_export.py
Expand Up @@ -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 += " "

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit a64a81a

Please sign in to comment.