[Qgis-user] python(3) script to calculate latitude longitude values from (ESRI) shape file

Stephen Kirby thinjogger at gmail.com
Wed Apr 21 21:02:47 PDT 2021


Nyall and Nicholas (earlier) and qgis list --

This is fantastic information.  I'm going to dive in and see what I can
discover.  Automatic conversion of the model to Python script is definitely
neat! Really appreciate this awesome forum and the availability of QGIS!

Best to all,
Steve

On Wed, Apr 21, 2021 at 7:24 PM Nyall Dawson <nyall.dawson at gmail.com> wrote:

> On Thu, 22 Apr 2021 at 06:43, wxgis <thinjogger at gmail.com> wrote:
> >
> > Hi -
> > Wondering if there is existing Python(3) script code that can take an
> (ESRI)
> > shape file as input and then calculate latitude/longitude/elevation
> values
> > for country boundaries.  For example, if the input file is a SHP file for
> > France, the output would be the lat/lon/elevation values for the country
> > boundaries.  I am quite new to QGIS, looking at version 3.18 (so only
> know
> > about ESRI shape files, maybe there are other types of SHP files?), and
> read
> > that in QGIS  I can edit the attribute table for a given layer and add
> > latitude/longitude attributes, but I am hoping to this more
> > programmatically, using the QGIS Python console.  I gladly welcome any
> ideas
> > on this.
>
> If you're new to this then I'd suggest skipping the Python part and
> instead making a graphical model using Processing tools to do what you
> want. The visual aspect of making models will help guide you through
> the process, and there's plently of video tutorials on Youtube showing
> how to do this.
>
> You can even then take the model and automatically convert it directly
> to a Python script with a single button click!
>
> Hope that helps,
> Nyall
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210421/7e77d1ff/attachment.html>


More information about the Qgis-user mailing list