]>
git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.gis/src/main/java/org/argeo/slc/gdal/OgrProcess.java
1 package org
.argeo
.slc
.gdal
;
5 import org
.argeo
.slc
.core
.execution
.tasks
.SystemCall
;
7 public class OgrProcess
implements Runnable
{
10 private String targetSrs
;
11 private String clipdst
;
15 SystemCall ogr2ogr
= new SystemCall("ogr2ogr");
16 if (targetSrs
!= null)
17 ogr2ogr
.arg("-t_srs", targetSrs
);
19 ogr2ogr
.arg("-clipdst", clipdst
);
21 // target is before source in OGR!
22 ogr2ogr
.arg(target
.getAbsolutePath());
23 ogr2ogr
.arg(source
.getAbsolutePath());
29 protected Boolean
runOgr2Ogr() {
30 return targetSrs
!= null || clipdst
!= null;
33 public void setTargetSrs(String targetSrs
) {
34 this.targetSrs
= targetSrs
;
37 public void setClipdst(String clipdst
) {
38 this.clipdst
= clipdst
;
41 public File
getSource() {
45 public void setSource(File source
) {
49 public File
getTarget() {
53 public void setTarget(File target
) {
57 public String
getTargetSrs() {
61 public String
getClipdst() {