Skip to content

Commit

Permalink
issue #93 and #94
Browse files Browse the repository at this point in the history
  • Loading branch information
vbnunes-csw committed Oct 18, 2016
1 parent 9ac8a80 commit fb05bf2
Show file tree
Hide file tree
Showing 8 changed files with 944 additions and 11 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
</resources>
</configuration>
</execution>
<!--<execution>
<execution>
<id>copy-data-resources</id>
<phase>install</phase>
<goals>
Expand All @@ -98,12 +98,12 @@
<resource>
<directory>${basedir}/src/main/app-resources/</directory>
<includes>
<include>**/GRASS_data/**</include>
<include>**/variables.txt</include>
</includes>
</resource>
</resources>
</configuration>
</execution>-->
</execution>
</executions>
</plugin>

Expand Down
2 changes: 2 additions & 0 deletions src/main/app-resources/application.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<parameter id="years" title="Years" abstract="Set the Years(s) you want to generate" scope="runtime" maxOccurs="1"></parameter>
<parameter id="MMU" title="MMU" abstract="Set the Minimum Mapping Unit in hectares for your final Land Cover map" scope="runtime" maxOccurs="1"></parameter>
<parameter id="User_training_data" title="User training data" abstract="Paste link to User Training Data zip file" scope="runtime" maxOccurs="1"/>
<parameter id="User_config_file" title="User configuration file" abstract="Paste link to User Configuration file - variables.txt" scope="runtime" maxOccurs="1"/>
<parameter id="JobID" title="JobID" abstract="teste" scope="runtime" maxOccurs="1"/>
</defaultParameters>
<defaultJobconf>
Expand All @@ -26,6 +27,7 @@
<parameter id="years"></parameter>
<parameter id="MMU">10</parameter>
<parameter id="User_training_data">no</parameter>
<parameter id="User_config_file">no</parameter>
</parameters>
</node>
</workflow>
Expand Down
7 changes: 5 additions & 2 deletions src/main/app-resources/bin/lulc_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def main():
ciop = cioppy.Cioppy()
dirname=os.path.dirname
appdir=os.path.abspath(os.path.join(os.path.dirname(__file__),".."))
variablesfile= os.path.join(appdir,'variables.txt')
variablesfile= os.path.join('/data','variables.txt')
getVarFromFile(variablesfile)
gisbase = data.gisbase
gisdbase = data.gisdbase
Expand All @@ -344,6 +344,7 @@ def main():
spatialr = data.spatialr
maxiter = data.maxiter
ranger = data.ranger
outputgeotriplesfile = data.outputgeotriplesfile
threshold = data.threshold
minsize = data.minsize
tilesize = data.tilesize
Expand Down Expand Up @@ -602,7 +603,9 @@ def main():
grass.run_command('r.colors', map = gen_lulcmap, rules = lulc_color_path, quiet=True)
grass.run_command("r.out.gdal", input=gen_lulcmap, output=lulcmaptif, overwrite=True)
#PUBLISH DATA
write_metadata(lulcmaptif.replace('.tif','_metadata.xml'),gen_lulcmap,lulcmaptif,name_dry,name_wet,MMU)
write_metadata(lulcmaptif.replace('.tif','_metadata.xml'),gen_lulcmap,lulcmaptif,name_dry,name_wet,MMU)
write_metadata_mapping(lulcmaptif.replace('.tif','_metadata.xml'),"/application/etc/mapping_wp7.ttl",lulcmaptif.replace('.tif','_metadata.ttl'))
convert_to_geotriples(lulcmaptif.replace('.tif','_metadata.ttl'),outputgeotriplesfile)
ciop.publish(lulcmaptif, metalink = True)
ciop.publish(lulcmaptif.replace('.tif','_metadata.xml'), metalink = True)
if p_aa==0:
Expand Down
Loading

0 comments on commit fb05bf2

Please sign in to comment.