Re: [Qgis-user] writing vector data for QGIS input from a python script using osgeo ogr

2019-01-22 Thread Mike Flannigan
As Etienne said, you can use geojson if you want to. I recommend it. Create geojson files that look like this: { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": "Feature", "properties": { "id": 1,

Re: [Qgis-user] writing vector data for QGIS input from a python script using osgeo ogr

2019-01-22 Thread Nicolas Cadieux
Hi, You will find most of the information on this page. https://qgis.org/en/docs/index.html#testing. The documentation is good but must always keep up with the ever evolving QGIS. This is not always the case as it is also maintained by a group of well meaning volunteers. You will find

Re: [Qgis-user] writing vector data for QGIS input from a python script using osgeo ogr

2019-01-22 Thread Lee Eddington
Etienne, Being a newer user I don’t know about the QGIS API. I will take a look. Thank you, Lee > On Jan 21, 2019, at 9:03 PM, Etienne Trimaille > wrote: > > QGIS is using OGR in the background to read vector data. So every format > supported by OGR is fine for QGIS. You can write

Re: [Qgis-user] writing vector data for QGIS input from a python script using osgeo ogr

2019-01-22 Thread Lee Eddington
Nicolas, Thank you for the link. I was able to use the info to create a wkt file that worked. But I also had to use a blog post to help me to figure out how to add the proper header: https://gis.stackexchange.com/questions/107152/how-to-create-wkt-file-readable-by-qgis-2-4-0

Re: [Qgis-user] writing vector data for QGIS input from a python script using osgeo ogr

2019-01-21 Thread Etienne Trimaille
QGIS is using OGR in the background to read vector data. So every format supported by OGR is fine for QGIS. You can write geojson, geopackage, sqlite, shapefile, it's fine for OGR API(write) and QGIS Desktop (read). But are you sure you want to use the OGR API to write your file? IMHO, QGIS API is

Re: [Qgis-user] writing vector data for QGIS input from a python script using osgeo ogr

2019-01-21 Thread Nicolas Cadieux
QGIS can read wkt. This could help. https://en.m.wikipedia.org/wiki/Well-known_text Nicolas > Le 21 janv. 2019 à 20:26, Lee Eddington a écrit : > > I’d like to write vector line data in lat/lon coordinates to a file that QGIS > can read and display. I have the osgeo ogr module, but can’t see

[Qgis-user] writing vector data for QGIS input from a python script using osgeo ogr

2019-01-21 Thread Lee Eddington
I’d like to write vector line data in lat/lon coordinates to a file that QGIS can read and display. I have the osgeo ogr module, but can’t see to find the right documentation on how to use it for this simple task. Thanks, Lee ___ Qgis-user mailing