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

Vincent Picavet vincent.ml at oslandia.com
Mon Jul 1 01:31:53 PDT 2013


Hi Regis, all,

You can also open a CSV with X.Y coordinates with a VRT file describing the 
geometry component. You could automatically generate and load such a VRT with 
an interface to guide the user.

Vincent

Le lundi 1 juillet 2013 09:48:00, HAUBOURG a écrit :
> 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<mailto:regis.haubourg at eau-adour-garonn
> e.fr> [cid:image002.jpg at 01CE5BAA.92C70ED0]
> http://www.eau-adour-garonne.fr<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<mailto: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<mailto: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<mailto: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<mailto:Qgis-developer at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> 
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org<mailto:Qgis-developer at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list