[GRASS-SVN] r42063 - grass-addons/ossim_grass/v.planet
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 29 17:56:53 EDT 2010
Author: epifanio
Date: 2010-04-29 17:56:53 -0400 (Thu, 29 Apr 2010)
New Revision: 42063
Modified:
grass-addons/ossim_grass/v.planet/v.planet.py
Log:
moved code to make omd style inside "if flag"
Modified: grass-addons/ossim_grass/v.planet/v.planet.py
===================================================================
--- grass-addons/ossim_grass/v.planet/v.planet.py 2010-04-29 21:49:30 UTC (rev 42062)
+++ grass-addons/ossim_grass/v.planet/v.planet.py 2010-04-29 21:56:53 UTC (rev 42063)
@@ -134,31 +134,31 @@
mapfile = os.path.join(vectorpath, 'head')
vrtdir = os.path.join(grassenv['GISDBASE'], grassenv['LOCATION_NAME'], mappa[1], 'vrt', 'vector/')
except :
- vectorpath = os.path.join(grassenv['GISDBASE'], grassenv['LOCATION_NAME'], grassenv['MAPSET'], mappa[0] )
+ vectorpath = os.path.join(grassenv['GISDBASE'], grassenv['LOCATION_NAME'], grassenv['MAPSET'], 'vector', mappa[0] )
mapfile = os.path.join(vectorpath, 'head' )
- vrtdir = os.path.join(grassenv['GISDBASE'], grassenv['LOCATION_NAME'], grassenv['MAPSET'], 'vector', 'vrt', 'vector/')
+ vrtdir = os.path.join(grassenv['GISDBASE'], grassenv['LOCATION_NAME'], grassenv['MAPSET'], 'vrt', 'vector/')
d = os.path.dirname(vrtdir)
if not os.path.exists(d):
os.makedirs(d)
vrtfilename = mappa[0] + '.vrt'
output = os.path.join(vrtdir, vrtfilename)
- if not os.path.exists(output):
- ogrvrt(mapfile,output)
- print 'try to make omd'
- makestile(output, options['brush'], options['pen'], options['size'], options['fill'], options['thickness'])
- proj_info = projinfo()
- unit = proj_info['units']
- if unit.lower() == 'meters':
- zoom_position = setCPRJ(options['map'])
- if unit.lower() == 'metres':
- zoom_position = setCPRJ(options['map'])
- if unit == 'Degrees':
- zoom_position = setCLL(options['map'])
- lat = zoom_position[0]
- lon = zoom_position[1]
- distance = zoom_position[2]
if add :
try:
+ if not os.path.exists(output):
+ ogrvrt(mapfile,output)
+ print 'try to make omd'
+ makestile(output, options['brush'], options['pen'], options['size'], options['fill'], options['thickness'])
+ proj_info = projinfo()
+ unit = proj_info['units']
+ if unit.lower() == 'meters':
+ zoom_position = setCPRJ(options['map'])
+ if unit.lower() == 'metres':
+ zoom_position = setCPRJ(options['map'])
+ if unit == 'Degrees':
+ zoom_position = setCLL(options['map'])
+ lat = zoom_position[0]
+ lon = zoom_position[1]
+ distance = zoom_position[2]
addzoom(output,lon,lat,distance,host,dport,pport)
print 'Added vector file :', mappa[0]
print 'Camera positioned to : '
More information about the grass-commit
mailing list