[gdal-dev] ogr2ogr and spatialite

2011-04-19 Thread iomeneandrei
Dear all,
I'm using ogr2ogr (GDAL 1.8.0) to import a shapefile in a spatialite db.

If I use spatialite gui to make it (without check with spatial index
option), I have only a new one table in my sqlite db.

If I use ogr2ogr ogr2ogr -append -s_srs EPSG:3004 -t_srs EPSG:3004 -f
SQLite -dsco SPATIALITE=NO db.sqlite input.shp, I have as output also the
spatial index tables. Is it normal?
Is it possible to use ogr2ogr without have in the db the spatial index
tables?

Best regards,

Andrea

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/ogr2ogr-and-spatialite-tp6286920p6286920.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Re: ogr2ogr and spatialite

2011-04-19 Thread iomeneandrei
Hi Even,

Even Rouault wrote:
 
 So try replacing -dsco SPATIALITE=NO with -lco SPATIAL_INDEX=NO
 

my fault, I'm stupid :)

Thank you very much


-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/ogr2ogr-and-spatialite-tp6286920p6287059.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] OGR and spatialite View

2011-04-12 Thread iomeneandrei
Dear all,
I have created a spatialite View and ogrinfo does not see any spatialite
View.

Is there some error in my data? Is it OGR able to read spatialite View?

Thank you,

a

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/OGR-and-spatialite-View-tp6265313p6265313.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Re: OGR and spatialite View

2011-04-12 Thread iomeneandrei
Chaitanya,

Chaitanya kumar CH wrote:
 
 Try to explicitly ask for the view as a layer with ogrinfo. You can also
 try
 to set the SQLITE_LIST_ALL_TABLES environment variable to TRUE.
 

I have set the SQLITE_LIST_ALL_TABLES environment variable to TRUE, and now
it works. 

Thank you very much,

Andrea


-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/OGR-and-spatialite-View-tp6265313p6266042.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: Fwd: Re: [gdal-dev] FWTools and GDAL 1.7.0

2011-01-05 Thread iomeneandrei

Hi all,
for what is worth also for me the simplicity of FWTOOLS wins.

Best regards,

andrea

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/gdal-dev-FWTools-and-GDAL-1-7-0-tp5887121p5891689.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Re: Mosaic the output of gdal2tiles

2011-01-05 Thread iomeneandrei

Hi Rahkonen,
thank you.

Rahkonen Jukka wrote:
 
 I have a feeling that gdal wms driver might be able to do it.  See
 examples at http://gdal.org/frmt_wms.html
 
This seems the right solution.

best regards

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Mosaic-the-output-of-gdal2tiles-tp5881014p5893838.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] RE: Mosaic the output of gdal2tiles (iomeneandrei)

2011-01-04 Thread iomeneandrei

Hi Stephen,
thank you for your reply.

Stephen Mather wrote:
 
 Hi Andrea,
  Probably the simplest way to handle this is with a virtual dataset.
 Rather than a direct mosaic, you create a virtual mosaic and then use
 gdal_translate to convert to a geotiff, e.g.
 

It seems to me (I'm not an expert) that gdalbuildvrt needs geospatial files
as source. The output of gdal2tiles are files and folders following OSGeo
Tile Map Service Specification. The single png created from gdal2tiles does
not contain any geospatial information. I know the bounding box of the
mosaic of my tiles, the SRS, and the resolution of every zoom level.
Then gdalbuildvrt - I think - is not able to associate any spatial
information to the single .png file I have, and it cannot build a virtual
image.

This is an example of the structure of the output files and folders of
gdal2tiles:
http://www.friendpaste.com/10wUZr6XB8SZqhuMYnCyhi

Thank you,

Andrea

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/gdal-dev-RE-Mosaic-the-output-of-gdal2tiles-iomeneandrei-tp5887707p5888231.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Mosaic the output of gdal2tiles

2011-01-03 Thread iomeneandrei

Hi all,
I have a folder with a gdal2tiles output: 6 levels of zoom (and folders),
with subfolders and  the .png tiles.

Is there a gdal tool to merge in a single geotiff file these .png tiles?

Thank you very much,

Andrea

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Mosaic-the-output-of-gdal2tiles-tp5881014p5881014.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Can't make Python binding work

2010-12-12 Thread iomeneandrei

Hi Martin,
you can download GDAL python from here:
http://www.python.org/ftp/python/2.6.5/

Best regards,

a


-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/gdal-dev-Can-t-make-Python-binding-work-tp5827891p5828817.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Re: Multipart to singlepart

2010-12-09 Thread iomeneandrei

Hi Jukka,
thank you for your time and for your advice.

Rahkonen Jukka wrote:
 
 If it does not matter to use some other tool than OGR, OpenJUMP can
 explode
 multifeatures and geometry collections.
 
My goal is to make this transformation in Python, and I did not want to
write either unnecessary code or complicated code (for me).
If I have a solid and interesting result, I will publish it here.

Best regards,

Andrea


-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Multipart-to-singlepart-tp5807508p5819931.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Re: Multipart to singlepart

2010-12-09 Thread iomeneandrei

Caro Paolo,

Paolo Corti wrote:
 
 Ciao Andrea
 this code will do the trick (note that it will create a polygon for
 each ring, so you will get a polygon for each hole as well)
 [...]
 
writing in groups like this is always a surprise and a great pleasure. Thank
you, thank you, thank you.

I have modified a little your code - https://gist.github.com/735330 - and I
have this message:
Polygon added.
Traceback (most recent call last):
  File PaoloIsGreat.py , line 32, in module multipoly2poly(in_lyr,
out_lyr)
  File PaoloIsGreat.py , line 8, in multipoly2poly for geom_part in geom:
TypeError: 'Geometry' object is not iterable

It seems that the object I'm trying to iterate is actually None. This is my
input file:
http://osgeo-org.1803224.n2.nabble.com/file/n5820800/poly.zip poly.zip 

As output I obtain only one polygon, and I should have three.

What do you think about?

Writing in groups like this is always a surprise and a great pleasure.

ciao,

a

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Multipart-to-singlepart-tp5807508p5820800.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Re: Multipart to singlepart

2010-12-09 Thread iomeneandrei

Hi Even,

Even Rouault wrote:
 
 Geometry have been made iterable only since GDAL 1.7.0. You need to
 upgrade 
 your GDAL version or modify a bit the script to make the iteration with
 the 
 OGR API.
 
 instead of :
 
 for geom_part in geom:
   addPolygon(geom_part.ExportToWkb(), out_lyr)
 
 try :
 
 for i in range(geom.GetGeometryCount()):
   geom_part = geom.GetGeometryRef(i)
   addPolygon(geom_part.ExportToWkb(), out_lyr)
 

now it works perfectly!!

Thank you very much,

Andrea

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Multipart-to-singlepart-tp5807508p5820973.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Re: Multipart to singlepart

2010-12-07 Thread iomeneandrei

Hi Frank,

Frank Warmerdam wrote:
 
 Reviewing the ogr2ogr code I see this does trigger a call to
 forceToPolygon()
 though *mostly* it exists to set the type of the created layer.  So, yes,
 -nlt polygon with ogr2ogr may well do what you want.
 
I have used this GML file as input:
https://gist.github.com/731590

It contains a multipolygon.

Then I run this command: ogr2ogr -f GML -nlt POLYGON  poly_output.gml
poly_input.gml

The output file contains the same multipolygon. Is it normal?

I'm using FWTools 2.4.7 for Windows.

Thank you very much,

Andrea

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Multipart-to-singlepart-tp5807508p5810838.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Re: Multipart to singlepart

2010-12-07 Thread iomeneandrei

Dear Frank,

Frank Warmerdam wrote:
 
 I tried it with a trunk build and the multipolygon is converted to a
 polygon.
 I suspect the feature of the forcing support is new and if you want it you
 would need a reasonably recent development build - more recent than
 FWTools.
 

I have downloaded GDAL 1.7.3 from here http://vbkto.dyndns.org/sdk/, and I
have made a test. The output file now does not contain ever MultiPolygon,
but it has only Polygon. And I have made this test using two output formats:
SQLite and GML. This is a GML output:
https://gist.github.com/732281

But I have a question for you: is it a real multpart to singlepart
transformation? The output file is without any MultiPolygon, but the two
polygons that constitute the former MultiPolygon remain in some way
geometrically related. I was thinking of getting two separate polygons, but
if I will select one of them in a desktop GIS, also the other one is
selected.
Probably it's correct, but it's not what I want.

It's really a pleasure to talk with you.

Thank you,

Andrea

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Multipart-to-singlepart-tp5807508p5812969.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Multipart to singlepart

2010-12-06 Thread iomeneandrei

Hi all,
is there in OGR a command that I can use to convert multipart polygons in
singleparts?

Thank you,

a

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Multipart-to-singlepart-tp5807508p5807508.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Re: Multipart to singlepart

2010-12-06 Thread iomeneandrei

Hi Frank,

Frank Warmerdam wrote:
 
 At the API or scripting level there is the
 OGRGeometryFactory::forceToPolygon()
 method to try and convert a multipolygon to a simple polygon.  
 
I will try using OGR API. I will be slow, but I hope I'll be able to do it.

Thank you very much,

a


-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Multipart-to-singlepart-tp5807508p5809639.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Re: Multipart to singlepart

2010-12-06 Thread iomeneandrei

Hi Frank,

Frank Warmerdam wrote:
 
 I am not aware of a way to do this from the commandline utilities.
 
could I use the -nlt parameter of ogr2ogr and force POLYGON? If no, what's
the power of -nlt parameter?

Once again, thank you,

a

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.spaziogis.it
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Multipart-to-singlepart-tp5807508p5809797.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[Gdal-dev] branched objects

2009-03-16 Thread iomeneandrei

Dear all,
is there a way, using some ogr utilities, to split a branched object into
simple (non-branched) objects? For example, a single, branched area object
composed of three islands will be split into three separate area objects.

Thank you very much,

Andrea

-
Andrea Borruso


email: aborr...@tin.it
website: http://blog.spaziogis.it
my 2.0 life: http://aborruso.storytlr.com/
feed: http://feeds2.feedburner.com/Tanto
38° 7' 48 N, 13° 21' 9 E

-- 
View this message in context: 
http://n2.nabble.com/branched-objects-tp2487194p2487194.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [Gdal-dev] SQLite problem

2008-10-30 Thread iomeneandrei

Hi all,
I have change client and I have no more problems.

Thank you for all. 

This is a great mailing list.

Best regards,

a

P.S. the client is http://sqliteadmin.orbmu2k.de/

-
Andrea Borruso


email: [EMAIL PROTECTED]
blog: http://blog.spaziogis.it

-- 
View this message in context: 
http://www.nabble.com/SQLite-problem-tp20233548p20243956.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[Gdal-dev] SQLite problem

2008-10-29 Thread iomeneandrei

Hi all,
I have created a sqlite spatial db with ogr2ogr, starting from a simple
shapefile.

I'm able to read the proper info of this sqlite db with ogrinfo.

If I add a column to this sqlite db inside the table where I have the
WKT_GEOMETRY, ogrinfo is no more able to read properly this db.

Is it possible to add a column to  a sqlite spatial db without destroy the
spatial component?

I'm using SQLite Manager 0.3.15 for firefox to edit the db.

I'm attaching the original sqlite file: 
http://www.nabble.com/file/p20233548/output1.sqlite output1.sqlite 

Thank you,

Andrea

-
Andrea Borruso


email: [EMAIL PROTECTED]
blog: http://blog.spaziogis.it

-- 
View this message in context: 
http://www.nabble.com/SQLite-problem-tp20233548p20233548.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [Gdal-dev] SQLite problem

2008-10-29 Thread iomeneandrei

Hi Frank,
thank you very much.

Frank Warmerdam-2 wrote:
 
 The file you referenced seems to work fine with my (trunk) ogrinfo.  Can
 you
 provide an example that ogrinfo can't read?  Generally, adding new columns
 to
 a spatial table should not cause problems for OGR.
 
The file I have attache was the right one.
I have used this query:
ALTER TABLE main.output ADD COLUMN test VARCHAR

And I have had the file I'm attaching now 
http://www.nabble.com/file/p20237327/output2.sqlite output2.sqlite .

I'm not able to read it with ogrinfo.

My sqlite client is this:
https://addons.mozilla.org/en-US/firefox/addon/5817

Thank you,

Andrea

-
Andrea Borruso


email: [EMAIL PROTECTED]
blog: http://blog.spaziogis.it

-- 
View this message in context: 
http://www.nabble.com/SQLite-problem-tp20233548p20237327.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [Gdal-dev] SQLite problem

2008-10-29 Thread iomeneandrei

Hi Even,

Even Rouault wrote:
 
 Yes, see http://www.sqlite.org/lang_altertable.html
 You need SQLite  3.1.3
 
to build my sqlite spatial db I use ogr2ogr utility I have in the lates
fwtools for windows.
The same for ogrinfo. Whit this I have:
FAILURE:
Unable to open datasource `C:\output2.sqlite

How is it possible to have sqlite  3.1.3 inside fwtools?

Thank you for all,

Andrea




-
Andrea Borruso


email: [EMAIL PROTECTED]
blog: http://blog.spaziogis.it

-- 
View this message in context: 
http://www.nabble.com/SQLite-problem-tp20233548p20237748.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev