[gdal-dev] Re: Modification to the ogr2ogr.java

sagar_sahay sagar at spiffymap.net
Fri Oct 8 06:50:07 EDT 2010


Hi Chaitanya,

Thanks for that, would you happen to know what is the work being done by the
function TranslateLayer in the code referenced in my previous message. I ask
this because after execution of this function my program displays the error 
and then exists the system. To stop this from happening I have just
commented the line and now the program works fine.

>From what I understand from your suggestion is this I should give the source
folder where all the ".shp" files are as input to the command something like
this:
ogr2ogr -t_srs WGS84 -s_srs ESRI::/home/shp/ osmnf.shp
NaturalFeature_Area.shp

How do i specify it to take only "*.shp" files  from the directory
specified.

I am writing the java code on netbeans for this , I have introduced a for
loop which constantly updates the following variables:

 String fileName=children[index].replace(".shp",".prj");
                      String args1[]=new String[6];
                      args1[0]= "-t_srs";
                      args1[1]= "WGS84";
                      args1[2]= "-s_srs";
                      args1[3]= "ESRI::/home/sagar/meridian data/"+fileName;
                      args1[4]= "/home/osmnf/";
                      args1[5]= "/home/meridian data/"+children[index];

Please share your views.

Thanks again.

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Modification-to-the-ogr2ogr-java-tp5614291p5614501.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list