Quantcast

This had escaped me!

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

This had escaped me!

Salvatore Larosa-2
QGIS also opens ZIP file containing SHP files!

Confirmed? or am I the chosen one? :-)

-SL
--
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Etienne Tourigny-3
Yup - I sort of silently introduced that - Jurgen and Tim have been
helpful in commiting and some testing.

Like it? It also opens other zip files, depending on the options you
choose in the Preferences (first tab, at the bottom)
Try it out in the browser, you can browse zips with various files.

Etienne

On Fri, May 4, 2012 at 7:09 PM, Salvatore Larosa <[hidden email]> wrote:

> QGIS also opens ZIP file containing SHP files!
>
> Confirmed? or am I the chosen one? :-)
>
> -SL
> --
> Salvatore Larosa
> linkedIn: http://linkedin.com/in/larosasalvatore
> twitter: @lrssvt
> skype: s.larosa
> IRC: lrssvt
>
> _______________________________________________
> Qgis-developer mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Larry_S
Etienne,

On Fri, May 4, 2012 at 4:43 PM, Etienne Tourigny <[hidden email]> wrote:
Yup - I sort of silently introduced that - Jurgen and Tim have been
helpful in commiting and some testing.

Like it? It also opens other zip files, depending on the options you
choose in the Preferences (first tab, at the bottom)
Try it out in the browser, you can browse zips with various files.

Wow. I had not noticed that feature of the new browser either. I was happily surprised when I found that the layer's ZIP URI is auto-accessed on project load. This is going to save a LOT of disk space. Nice work!


Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota
 


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Salvatore Larosa-2
In reply to this post by Etienne Tourigny-3
Il giorno ven, 04/05/2012 alle 19.43 -0300, Etienne Tourigny ha scritto:
> Yup - I sort of silently introduced that - Jurgen and Tim have been
> helpful in commiting and some testing.
>
> Like it? It also opens other zip files, depending on the options you
> choose in the Preferences (first tab, at the bottom)
> Try it out in the browser, you can browse zips with various files.
>
> Etienne

Wow, even drag and drop is very nice!
drag from nautilus and drop into QGIS, cool!

All the Best,

-SL

--
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Sandro Santilli-2
In reply to this post by Etienne Tourigny-3
On Fri, May 04, 2012 at 07:43:30PM -0300, Etienne Tourigny wrote:
> Yup - I sort of silently introduced that - Jurgen and Tim have been
> helpful in commiting and some testing.
>
> Like it? It also opens other zip files, depending on the options you
> choose in the Preferences (first tab, at the bottom)
> Try it out in the browser, you can browse zips with various files.

I love it !

--strk;

  ,------o-.
  |   __/  |    Delivering high quality PostGIS 2.0 !
  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
  `-o------'

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Tim Sutton-4
Hi

On Sat, May 5, 2012 at 11:30 AM, Sandro Santilli <[hidden email]> wrote:

> On Fri, May 04, 2012 at 07:43:30PM -0300, Etienne Tourigny wrote:
>> Yup - I sort of silently introduced that - Jurgen and Tim have been
>> helpful in commiting and some testing.
>>
>> Like it? It also opens other zip files, depending on the options you
>> choose in the Preferences (first tab, at the bottom)
>> Try it out in the browser, you can browse zips with various files.
>
> I love it !
>
> --strk;
>
>  ,------o-.
>  |   __/  |    Delivering high quality PostGIS 2.0 !
>  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
>  `-o------'
>

I am glad to see you have adopted a topologically correct sig!

:-)

Regards

Tim

> _______________________________________________
> Qgis-developer mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Visit http://linfiniti.com to find out about:
 * QGIS programming and support services
 * Mapserver and PostGIS based hosting plans
 * FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Giovanni Manghi-2
In reply to this post by Etienne Tourigny-3
Hi Etienne,

> Like it? It also opens other zip files, depending on the options you
> choose in the Preferences (first tab, at the bottom)
> Try it out in the browser, you can browse zips with various files.


this is really super cool, thanks!

just noticed one thing, if the zip file contains >1 raster then is not
shown in the browser, while if it contains just one it works ok (also
from the add raster dialog).

cheers

-- Giovanni --

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Etienne Tourigny-3
Hi all

On Sat, May 5, 2012 at 6:03 PM, Giovanni Manghi
<[hidden email]> wrote:
> Hi Etienne,
>
>> Like it? It also opens other zip files, depending on the options you
>> choose in the Preferences (first tab, at the bottom)
>> Try it out in the browser, you can browse zips with various files.
>
>
> this is really super cool, thanks!

Nice that you like it!

I forgot to mention that gzipped files are supported also! (but not
for shapefiles as they are not a single file)

This is all possible due to GDAL/OGR /vsizip/ and /vsigzip/ mechanism
, more info at
http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip

QuaZIP and zlib are used to get zip file listing (this is optional at
compilation, but supported by osgeo4w and linux builds).

>
> just noticed one thing, if the zip file contains >1 raster then is not
> shown in the browser, while if it contains just one it works ok (also
> from the add raster dialog).

You have to change the "Scan zip" settings (in the general options),
the possible values are

- No
- Passthru - this just sets the uri to /vsizip/file.zip (which is the
way gdal/ogr supports zip files) and does not support multiple files
- Basic Scan - this opens the zip file and presents the files which
extension is supported  (.tif, .shp, etc)
- Full Scan - this presents the files inside the zip which are valid
(takes longer)

Default value is Passthru, but perhaps "Basic Scan" would be a better default?
I had chosen Passthru as a default before using QuaZip, but it is
probably not the best default now.

Etienne

>
> cheers
>
> -- Giovanni --
>
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Giovanni Manghi-2
Hi Etienne,


> > just noticed one thing, if the zip file contains >1 raster then is not
> > shown in the browser, while if it contains just one it works ok (also
> > from the add raster dialog).
>
> You have to change the "Scan zip" settings (in the general options),
> the possible values are
>
> - No
> - Passthru - this just sets the uri to /vsizip/file.zip (which is the
> way gdal/ogr supports zip files) and does not support multiple files
> - Basic Scan - this opens the zip file and presents the files which
> extension is supported  (.tif, .shp, etc)
> - Full Scan - this presents the files inside the zip which are valid
> (takes longer)
>
> Default value is Passthru, but perhaps "Basic Scan" would be a better default?
> I had chosen Passthru as a default before using QuaZip, but it is
> probably not the best default now.


Thanks, it works.

I just noticed that today the only way to add a zipped shape is through
the browser and the add vector layer dialog, drag and drop and CLI all
return "is not a valid or recognized data source". If is a zipped raster
all methods work fine.

Can you confirm?

cheers


-- Giovanni --

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Etienne Tourigny-3
Giovanni,

For now file open and commandline open only work in "Passthru" mode -
which works if there is only one "dataset" inside the file.

it passes the base file e.g. /vsizip/file.zip to gdal/ogr

whereas scan mode actually opens the zip and if there are many files
inside will pass the complete path to gdal/ogr
/vsizip/file.zip/file1.tif
/vsizip/file.zip/file2.tif


For zipped shapes it depends on gdal version I guess.  Should work
with gdal>=1.8 though.

For example, with gdal-1.9 I can do

$ ogrinfo -ro /vsizip//home/src/qgis/qgis-etiennesky/tests/testdata/points2.zip
INFO: Open of `/vsizip//home/src/qgis/qgis-etiennesky/tests/testdata/points2.zip'
      using driver `ESRI Shapefile' successful.
1: points (Point)

and when I run qgis /home/src/qgis/qgis-etiennesky/tests/testdata/points2.zip
it works.

Perhaps your zip files contain more than 1 dataset?

Try this to see if you gdal/ogr version supports it:
ogrinfo -ro /vsizip/path_to_shape_zip.zip

and if not try with the qgis source test file
/tests/testdata/points2.zip and send me your file (or its listing).


Now on to multi-dataset zipfiles:

I fixed that last night, by presenting a dialog similar to the
sublayers dialog.

Check out my repos at
https://github.com/etiennesky/Quantum-GIS/tree/vsifile

Also in there is support for .tar and .tar.gz, although .tar.gz are
not scanned immediately when the folder is opened in the browser, you
have to open the file to scan the contents (because of performance
issues with .tar.gz)
.tar and .zip files are scanned when the folder is opened, because the
time to consult file contents is minimal.

I don't think these features will be in 1.8, but I'll submit them
after 1.8 is out.


cheers,
Etienne



On Wed, May 9, 2012 at 10:41 AM, Giovanni Manghi
<[hidden email]> wrote:

> Hi Etienne,
>
>
>> > just noticed one thing, if the zip file contains >1 raster then is not
>> > shown in the browser, while if it contains just one it works ok (also
>> > from the add raster dialog).
>>
>> You have to change the "Scan zip" settings (in the general options),
>> the possible values are
>>
>> - No
>> - Passthru - this just sets the uri to /vsizip/file.zip (which is the
>> way gdal/ogr supports zip files) and does not support multiple files
>> - Basic Scan - this opens the zip file and presents the files which
>> extension is supported  (.tif, .shp, etc)
>> - Full Scan - this presents the files inside the zip which are valid
>> (takes longer)
>>
>> Default value is Passthru, but perhaps "Basic Scan" would be a better default?
>> I had chosen Passthru as a default before using QuaZip, but it is
>> probably not the best default now.
>
>
> Thanks, it works.
>
> I just noticed that today the only way to add a zipped shape is through
> the browser and the add vector layer dialog, drag and drop and CLI all
> return "is not a valid or recognized data source". If is a zipped raster
> all methods work fine.
>
> Can you confirm?
>
> cheers
>
>
> -- Giovanni --
>
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Salvatore Larosa-2
In reply to this post by Giovanni Manghi-2
Il giorno mer, 09/05/2012 alle 14.41 +0100, Giovanni Manghi ha scritto:

> Thanks, it works.
>
> I just noticed that today the only way to add a zipped shape is through
> the browser and the add vector layer dialog, drag and drop and CLI all
> return "is not a valid or recognized data source". If is a zipped raster
> all methods work fine.
>
> Can you confirm?
>
> cheers

Hi Giovanni,
here drag&drop it in MapCanvas works fine!
but only with zipped files containing a single dataset!
Before it was not so! I could choose which dataset import from a popup
window!
What is changed?

--
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Etienne Tourigny-3
On Wed, May 9, 2012 at 11:40 AM, Salvatore Larosa <[hidden email]> wrote:

> Il giorno mer, 09/05/2012 alle 14.41 +0100, Giovanni Manghi ha scritto:
>> Thanks, it works.
>>
>> I just noticed that today the only way to add a zipped shape is through
>> the browser and the add vector layer dialog, drag and drop and CLI all
>> return "is not a valid or recognized data source". If is a zipped raster
>> all methods work fine.
>>
>> Can you confirm?
>>
>> cheers
>
> Hi Giovanni,
> here drag&drop it in MapCanvas works fine!
> but only with zipped files containing a single dataset!
> Before it was not so! I could choose which dataset import from a popup
> window!
> What is changed?

Hmm you could drag&drop a zip file before?   and before  what? Was
this possible before my changes or you mean before yesterday's
changes?

regards

>
> --
> Salvatore Larosa
> linkedIn: http://linkedin.com/in/larosasalvatore
> twitter: @lrssvt
> skype: s.larosa
> IRC: lrssvt
>
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Salvatore Larosa-2
Il giorno mer, 09/05/2012 alle 11.43 -0300, Etienne Tourigny ha scritto:

> On Wed, May 9, 2012 at 11:40 AM, Salvatore Larosa <[hidden email]> wrote:
> > Il giorno mer, 09/05/2012 alle 14.41 +0100, Giovanni Manghi ha scritto:
> >> Thanks, it works.
> >>
> >> I just noticed that today the only way to add a zipped shape is through
> >> the browser and the add vector layer dialog, drag and drop and CLI all
> >> return "is not a valid or recognized data source". If is a zipped raster
> >> all methods work fine.
> >>
> >> Can you confirm?
> >>
> >> cheers
> >
> > Hi Giovanni,
> > here drag&drop it in MapCanvas works fine!
> > but only with zipped files containing a single dataset!
> > Before it was not so! I could choose which dataset import from a popup
> > window!
> > What is changed?
>
> Hmm you could drag&drop a zip file before?   and before  what? Was
> this possible before my changes or you mean before yesterday's
> changes?
>
> regards
>

for _before_ mean the date of my first post (May 05)!

Regards,

-SL

--
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Giovanni Manghi-2
In reply to this post by Etienne Tourigny-3
Hi,

> Hmm you could drag&drop a zip file before?   and before  what? Was
> this possible before my changes or you mean before yesterday's
> changes?


my bad. I was testing on a machine with an old gdal version. Sorry for
the noise.

Cheers

-- Giovanni --

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: This had escaped me!

Salvatore Larosa-2
In reply to this post by Etienne Tourigny-3
Il giorno mer, 09/05/2012 alle 11.43 -0300, Etienne Tourigny ha scritto:
> Hmm you could drag&drop a zip file before?   and before  what? Was
> this possible before my changes or you mean before yesterday's
> changes?
>
> regards
>

My double bad! I dragged a folder rather that a zipped file!

I damn need to sleep!

Cheers,

-SL

--
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Loading...