[Qgis-user] writing vector data for QGIS input from a python script using osgeo ogr
Nicolas Cadieux
nicolas.cadieux at archeotec.ca
Tue Jan 22 09:31:14 PST 2019
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 some information in the cookbook but this concern the API and not necessary that file format. https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/geometry.html. There are so many files formats that QGIS does not document or give examples on every one.
As for the file formats accepted in Qgis, you should probably refer to the GDAL library. https://www.gdal.org/. There, you will see the various files formats that QGIS
can use as it relies on GDAL to read and write to files. Documentation on that site is good but as an untrained programmer, I find it hard to navigate. You might prefer The Gdal Cookbook. It is outdated as it’s based on gdal 1.x and not 2.x but it contain easy code that can help you out. https://pcjericks.github.io/py-gdalogr-cookbook/ It’s the best python gdal tutorial for dummies out there! I mostly fall in the dummy category!
Cheer!
Nicolas
> Le 22 janv. 2019 à 12:12, Lee Eddington <lee.w.eddington at gmail.com> a écrit :
>
> 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
>
> Do you know where the official documentation is that explains that? I’m sure it’s out there, but I couldn’t find it.
>
> Thanks,
> Lee
>
>
>
>> On Jan 21, 2019, at 8:48 PM, Nicolas Cadieux <nicolas.cadieux at archeotec.ca> wrote:
>>
>> 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 <lee.w.eddington at gmail.com> 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 to find the right documentation on how to use it for this simple task.
>>>
>>> Thanks,
>>> Lee
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190122/1a08dbfd/attachment.html>
More information about the Qgis-user
mailing list