[gdal-dev] Re: GDAL Java Binding meomory problem under intensive method calls

2012-01-09 Thread easyl
http://trac.osgeo.org/gdal/ticket/4431 -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GDAL-Java-Binding-meomory-problem-under-intensive-method-calls-tp7155011p7168002.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___

[gdal-dev] Re: GDAL Java Binding meomory problem under intensive method calls

2012-01-07 Thread easyl
Ja, I am re-writing now the ogrtindex.cpp from http://svn.osgeo.org/gdal/trunk/gdal/apps/ogrtindex.cpp in Java. It seems be rather easier than ogr2ogr or ogrinfo. I found a Clone call in cpp code poFeatureDefn = poLayer->GetLayerDefn()->Clone(); But in Java binding (1.8.1) there is no Clone(

[gdal-dev] Re: GDAL Java Binding meomory problem under intensive method calls

2012-01-06 Thread easyl
your are right! It fixed the problem!! Actually I have another question (after fixing the violation bug). Can I implement ogrtindex in Java as well? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GDAL-Java-Binding-meomory-problem-under-intensive-method-calls-tp7155011p7

[gdal-dev] Re: GDAL Java Binding meomory problem under intensive method calls

2012-01-06 Thread easyl
directly using ogr2ogr and ogrinfo from http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/java/apps/ I made a following test cae. somehow I noticed that the error occurs when the S57 data more than 1mb == public class TestViolation { public static void main(Str

[gdal-dev] GDAL Java Binding meomory problem under intensive method calls

2012-01-05 Thread easyl
GDAL 1.8.1 on Win64 basically I just use ogr2ogr and ogrinfo from gdal/java examples. I wrote a test case with processing S57 (*000) data: /* read layer information with ogrinfo */ final String param[] = { "-ro", "-al", src}; final List layers = ogrinfo.execute(param); // I just collect

[gdal-dev] Re: determine real number precision with ogr2ogr

2010-07-22 Thread easyl
thanks for all your suggestions! Using 'cast' sql option with ogr2ogr is interesting. i.e. "SELECT CAST(DEPTH AS numeric(8,1)) from SOUNDG" But I still have two questions. 1. now I have all real number with 1 digit precision. The values look like 1.2, 3.2, 2.0, 1.0. Actually it is alread

[gdal-dev] determine real number precision with ogr2ogr

2010-07-21 Thread easyl
How can I let ogr2ogr keep, change or determine real number precision?? when converting shapefiles. ogr2ogr changes the representation (or precision) of a numeric attributes. For example, I use ogr2ogr to convert S-57 files to shapefiles. The layer "SOUNDG" of S-57 represents the water depth in

[gdal-dev] Re: ogrtindex take only one feature from a layer

2010-07-16 Thread easyl
thanks, you are right. I was looking for something that can "merge" all shapefiles. But will a huge merged shapeflle take a long time to load in a Mapserver? since I have really a lot of shapefiles to merge. I just thought the ogrtindex may help. :) -- View this message in context: http://osg

[gdal-dev] ogrtindex take only one feature from a layer

2010-07-14 Thread easyl
I tried ogrtindex on two shapefiles. Each source shapefile has more than one "Feature Count" in a Polygon layer. after running "ogrtindex index.shp src/*.shp" I got index.shp with only two features (one from each source shapefile). And the Polygon is not the same from the source data. How exactl

[gdal-dev] Merge the overlapping results from gdal2tiles?

2010-04-27 Thread easyl
I trying to use gdal to generate web map tiles from several raster images (map1.png, map2.png ...). Each raster image is processed with these commands (gdal1.6) > gdal_translate -strict -of VRT -a_srs EPSG:4326 -gcp ... map1.png > map1.vrt > > gdalwarp -of VRT -r cubic -s_srs EPSG:4326 -t_srs

[gdal-dev] how to set raster bands with gdalwarp

2010-03-30 Thread easyl
I am making map tiles from a PNG (in RGBA color) with following commands. gdal_translate -of VRT -a_srs EPSG:4326 -gcp ... source.png source.vrt gdalwarp -of VRT -s_srs EPSG:4326 -t_srs EPSG:900913 source.vrt source_web.vrt gdal2tiles -p mercator -z 2-11 -w google source_web.vrt By the gdalwar

Re: [gdal-dev] gdal2tiles - transparent area on base image becomes opaque in tiles

2010-03-30 Thread easyl
open base_mercator.vrt it should looks like ... ... 4 Try to manually modify base_mercator.vrt ... Red Green Blue Alpha ... ...