I just had a chance to install master and try out the geometry type override, 
nice.  I see "GeometryCollection" is an option - have I been mistaken in 
thinking QGIS can't work with GeometryCollections?

The "force multi-type" option is a nice feature too - I'm currently struggling 
with a similar issue.
Regards,
Martin.

-----Original Message-----
From: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of Nyall 
Dawson
Sent: Tuesday, 24 November 2015 7:32 AM
To: Matthias Kuhn
Cc: qgis-user@lists.osgeo.org
Subject: Re: [Qgis-user] Creating Geometries for tabular data

On 17 November 2015 at 06:59, Matthias Kuhn <matth...@opengis.ch> wrote:
> I use the process on a postgis DB, but Shapefiles are also capable of 
> having tabular data without geometries attached.
> However I do not know how you would create such a file (easily) from 
> an existing geometry-less layer.
>
> Maybe something like this:
> http://gis.stackexchange.com/questions/327/how-can-i-convert-an-excel-
> file-with-x-y-columns-to-a-shapefile
>
> Or try with adding a dummy geometry column in a csv so it loads as 
> points and then save as shapefile.

Ok, with improvements that just landed in QGIS master (see [1]) this is now 
MUCH easier. Now, you can right click the geometryless table in the legend and 
select "Save as". In the save vector layer dialog there's a new option to 
override the geometry type for the saved file.
So you can choose to save the geometryless table with a Point/Line/Polygon 
geometry, which will obviously all initially be empty. Then, you can select 
features from the attribute table and use the "add part" tool to attach 
geometries to these records.

The new option also lets you force the saved file to be multipart, which is 
also useful in some circumstances.

Nyall

[1] https://github.com/qgis/QGIS/commit/ffebfd9bb719daf1ffa9bf7dde68c6e5892dcb89

>
> Best,
> Matthias
>
>
> On 11/16/2015 03:00 PM, DelazJ wrote:
>
> Hi,
> Matthias, what kind of format can this file be?
> This is not the first time I see MapInfo user asking about this 
> feature. I personnaly had last week to add geometries to features that 
> were in a tabular file (csv) and couldn't find how to do this except 
> giving an unique ID to the table data, and in another shapefile 
> digitizing, filling ID after each drawing and, at the end joining 
> layers. It was possible because there was not so many features but it's 
> unfriendly.
> I thought I could save the csv into shapefile (even empty)  and 
> proceed with the "add part" tool but "saving as" failed.
> It would be nice if we could find a way to address this "issue"...
>
> 2015-11-16 7:22 GMT+01:00 Matthias Kuhn <matth...@opengis.ch>:
>>
>> Hi,
>>
>> IIRC you can use the "add part" tool to create geometries for 
>> existing objects. Just use the attribute table to select the proper 
>> object and then digitize with the add part tool. Of course the 
>> selected layer has to be capable of saving geomtries in the format 
>> you like (i.e. you cannot geometrizise an excel table).
>>
>> Cheers,
>> Matthias
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
> --
> Matthias Kuhn
> OPENGIS.ch - https://www.opengis.ch
> Spatial • (Q)GIS • PostGIS • Open Source
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

This email is intended for the named recipient only.  The information it 
contains may be confidential.  If you are not the intended recipient you must 
not reproduce or distribute any part of this email, disclose its contents to 
any other party or take any action in reliance on it.  If you have received 
this email in error, please contact the sender immediately and delete the 
message.
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to