[Qgis-developer] New feature's needed, create geometry from attribute

Nathan Woodrow madmanwoo at gmail.com
Mon Jul 1 01:09:46 PDT 2013


Hey Regis,

I think a Layer -> Create Geometry Layer menu item would be a great idea
for non geometry layers.

Wouldn't be that hard to do I don't think.

Sqlite might be the best format as it's light and flexible.  If you want
something dynamic i.e change the data, updates the points, then maybe a
plugin layer would be best. I am planning on adding the ability to define
data provider in Python for 2.1, I do have working code just can't commit
it, which I think would work well here.  It would wrap the other layers
dataprovider and just return the geometry on the fly.

We could make it 2.1.

Regards,
Nathan


On Mon, Jul 1, 2013 at 5:48 PM, HAUBOURG <
regis.haubourg at eau-adour-garonne.fr> wrote:

>  Hi all, let me precise the need:****
>
> Numerical vertex edit and wkt plugin are usefull when dealing with one
> geometry. ****
>
> Geom calculation with field update can create eventually a WKB, but it’s
> absolutely not user friendly, and there is actually no way to load a layer
> from that in a file based layer. ****
>
> ** **
>
> Think of a user getting a excel or calc spreadsheet with XY inside. The
> only way to import it directly as a spatial layer (not talking about using
> sqlite or postgis.. too complex for common users not even aware of data
> source types) is too export it to csv and import it with delimited text
> plugin. ****
>
> That is always a pain since no tool exports csv in the same way when
> dealing with numerical / text types, decimal separators… ****
>
> XLS, calc, dbf do type correctly fields and avoid any file conversion (if
> no formula or problem in field names today). Importing directly the
> datasource, and being able to spatialize it afterwards , only if needed
> (join pure attribute data is also a use case), would be nice. ****
>
> ** **
>
> So is the need for my corp.****
>
> My question : I would like to avoid data duplication (again) , is that
> feasible using pluginlayerType in python API todayu, or do I need some core
> modifications ? Of course, that need to be reloaded correctly with a
> project file. ****
>
> ** **
>
> Régis****
>
> ** **
>
> ** **
>
> ** **
>
>  ****
>
> Cordialement,****
>
> Régis Haubourg****
>
> ----------------------------------------------------------------------
> --------------
> Régis Haubourg
>
> Administrateur de données Géographiques
> Département des Systèmes d'Information (DCSI)
> Agence de l'eau Adour Garonne
> 90 rue du Férétra,
> 31078 Toulouse Cedex4
> Tél: 05 61 36 82 58
> Mail: regis.haubourg at eau-adour-garonne.fr****
>
> [image: cid:image002.jpg at 01CE5BAA.92C70ED0]
> http://www.eau-adour-garonne.fr****
>
> * *
>
> Accédez aux données sur l'eau  :****
>
> http://adour-garonne.eaufrance.fr/ ****
>
> ** **
>
> *De :* kimaidou [mailto:kimaidou at gmail.com]
> *Envoyé :* dimanche 30 juin 2013 22:00
> *À :* Anita Graser
> *Cc :* Alexander Bruy; qgis-developer; HAUBOURG
> *Objet :* Re: [Qgis-developer] New feature's needed, create geometry from
> attribute****
>
> ** **
>
> Hi****
>
> What about using the field calculator ? I think I have seen a method in
> the "geometry" tools : something like geomfromwkt ? If needed, we could
> simply add a way to modifiy the features geometry with the field
> calculator, and it will do the trick. ****
>
> ** **
>
> ** **
>
> 2013/6/30 Anita Graser <anitagraser at gmx.at>****
>
> The Quick WKT plugin does something very similar.****
>
> Anita****
>
> ** **
>
> On Sun, Jun 30, 2013 at 3:06 PM, Alexander Bruy <alexander.bruy at gmail.com>
> wrote:****
>
> Hi, what about NumericalVertexEdit plugin? If I understand correctly, it
> do what you need.
>
> 2013/6/30 Régis Haubourg <regis.haubourg at eau-adour-garonne.fr>:****
>
> > Hi all,
> > After some training courses here, a very common use case is not satisfied
> > easily:
> >
> > The only entry to create geometry from text (XY or WKT) is the delimited
> > text plugin.
> > It appears that having a separate fonction "create point" like in
> Mapinfo or
> > Arcgis would be really handy, and could avoid the need of csv import.
> >
> > I was thinking of making a plugin for this, but I'm wondering what is the
> > best approach.
> >  1- duplicate layer into a memory layer. Easy, requires MemoryLayerSaver
> to
> > make data persistent, is not dynamic with datasource.
> >  2- create a pluginLayer? I'm not sure it will do what I need. I would
> like
> > the project to keep a reference to the datasource (xls, whatever ogr/
> > postgres/ sqlite/ spatialite) and replace or create geometry on load by
> > reading XY columns or WKT column.
> >
> > Is that feasable in a plugin,  as a proof of concept, or does it require
> > core classes modifications (C++ work , so I won't do it by myself)
> >
> > Thanks for your tips,
> > Régis
>
> --****
>
> Alexander Bruy****
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer****
>
> ** **
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer****
>
> ** **
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130701/e4715098/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 1253 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130701/e4715098/attachment.jpg>


More information about the Qgis-developer mailing list