Is it possible to read GML or KML files with Fiona?
up vote
-1
down vote
favorite
I'd like to know if it's possible to read/write GML files (or even KML files) using Fiona.
Fiona documents don't specify what drivers we can use. I read some answers about the drivers that are avalaible but I still haven't figured out the right answer.
These two different sentences print a different number of drivers. The first one doesn't include GML o KML (in fact there are very few formats supported).
print(fiona.supported_drivers)
vs
print('n'.join(sorted(fiona.drivers().drivers())))
I know how to do it using GDAL/OGR but I want to do the same using Fiona if it's possible.
python kml gml fiona
add a comment |
up vote
-1
down vote
favorite
I'd like to know if it's possible to read/write GML files (or even KML files) using Fiona.
Fiona documents don't specify what drivers we can use. I read some answers about the drivers that are avalaible but I still haven't figured out the right answer.
These two different sentences print a different number of drivers. The first one doesn't include GML o KML (in fact there are very few formats supported).
print(fiona.supported_drivers)
vs
print('n'.join(sorted(fiona.drivers().drivers())))
I know how to do it using GDAL/OGR but I want to do the same using Fiona if it's possible.
python kml gml fiona
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I'd like to know if it's possible to read/write GML files (or even KML files) using Fiona.
Fiona documents don't specify what drivers we can use. I read some answers about the drivers that are avalaible but I still haven't figured out the right answer.
These two different sentences print a different number of drivers. The first one doesn't include GML o KML (in fact there are very few formats supported).
print(fiona.supported_drivers)
vs
print('n'.join(sorted(fiona.drivers().drivers())))
I know how to do it using GDAL/OGR but I want to do the same using Fiona if it's possible.
python kml gml fiona
I'd like to know if it's possible to read/write GML files (or even KML files) using Fiona.
Fiona documents don't specify what drivers we can use. I read some answers about the drivers that are avalaible but I still haven't figured out the right answer.
These two different sentences print a different number of drivers. The first one doesn't include GML o KML (in fact there are very few formats supported).
print(fiona.supported_drivers)
vs
print('n'.join(sorted(fiona.drivers().drivers())))
I know how to do it using GDAL/OGR but I want to do the same using Fiona if it's possible.
python kml gml fiona
python kml gml fiona
asked Nov 11 at 14:11
Daniel
123
123
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
In order to read both KML and GML file formats the OGR binaries distributed with the Fiona implementation you're using need to be compiled against libexpat or Xerces (XML parsers). If these libraries exist in the same installation where the ogr.dll (Windows), ogr.so (Linux) used by Fiona is, then read support is most probably available. If no, then only write support will be available.
Does it mean that we should use GDAL/OGR to work with most of the vectorial formats and only use Fiona to work with the very few formats avalaible according to (fiona.supported_drivers? This way Fiona is very limited, isn't it? is there any way I can make Fiona work with other formats like GML o KML? What profesionals usually do? Thanks
– Daniel
Nov 15 at 15:06
I guess Fiona's main purpose is to provide data to Shapely. As Shapely is not able to read many formats, Fiona doesn't need to write in many formats either. If we want to transform data between different vectorial formats it's better to use OGC. However, we can use OGR to provide data to Shapely too so most of the time it's worth it to work with OGC instead of working with Fiona. I would appreciate some opinions about that. Thanks
– Daniel
Nov 15 at 17:04
Fiona IS a wrapper for OGR github.com/Toblerity/Fiona
– lusitanica
Nov 15 at 19:27
...and Shapely is a wrapper around GEOS C++. Both projects exist because original SWIG generated OGR python bindings are not very "pythonic" (there's not even a documented API, the only documentations available is OGR C++ API)
– lusitanica
Nov 15 at 22:11
Anyway, it doesn't hurt you trying to read/write a GML/KML and see what happens. Just don't go thinking that because drivers are not listed, functionality isn't there... as you said different lines are printing different drivers. Besides, drivers() lists only pertains to Read support.
– lusitanica
Nov 15 at 23:36
|
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
In order to read both KML and GML file formats the OGR binaries distributed with the Fiona implementation you're using need to be compiled against libexpat or Xerces (XML parsers). If these libraries exist in the same installation where the ogr.dll (Windows), ogr.so (Linux) used by Fiona is, then read support is most probably available. If no, then only write support will be available.
Does it mean that we should use GDAL/OGR to work with most of the vectorial formats and only use Fiona to work with the very few formats avalaible according to (fiona.supported_drivers? This way Fiona is very limited, isn't it? is there any way I can make Fiona work with other formats like GML o KML? What profesionals usually do? Thanks
– Daniel
Nov 15 at 15:06
I guess Fiona's main purpose is to provide data to Shapely. As Shapely is not able to read many formats, Fiona doesn't need to write in many formats either. If we want to transform data between different vectorial formats it's better to use OGC. However, we can use OGR to provide data to Shapely too so most of the time it's worth it to work with OGC instead of working with Fiona. I would appreciate some opinions about that. Thanks
– Daniel
Nov 15 at 17:04
Fiona IS a wrapper for OGR github.com/Toblerity/Fiona
– lusitanica
Nov 15 at 19:27
...and Shapely is a wrapper around GEOS C++. Both projects exist because original SWIG generated OGR python bindings are not very "pythonic" (there's not even a documented API, the only documentations available is OGR C++ API)
– lusitanica
Nov 15 at 22:11
Anyway, it doesn't hurt you trying to read/write a GML/KML and see what happens. Just don't go thinking that because drivers are not listed, functionality isn't there... as you said different lines are printing different drivers. Besides, drivers() lists only pertains to Read support.
– lusitanica
Nov 15 at 23:36
|
show 1 more comment
up vote
1
down vote
In order to read both KML and GML file formats the OGR binaries distributed with the Fiona implementation you're using need to be compiled against libexpat or Xerces (XML parsers). If these libraries exist in the same installation where the ogr.dll (Windows), ogr.so (Linux) used by Fiona is, then read support is most probably available. If no, then only write support will be available.
Does it mean that we should use GDAL/OGR to work with most of the vectorial formats and only use Fiona to work with the very few formats avalaible according to (fiona.supported_drivers? This way Fiona is very limited, isn't it? is there any way I can make Fiona work with other formats like GML o KML? What profesionals usually do? Thanks
– Daniel
Nov 15 at 15:06
I guess Fiona's main purpose is to provide data to Shapely. As Shapely is not able to read many formats, Fiona doesn't need to write in many formats either. If we want to transform data between different vectorial formats it's better to use OGC. However, we can use OGR to provide data to Shapely too so most of the time it's worth it to work with OGC instead of working with Fiona. I would appreciate some opinions about that. Thanks
– Daniel
Nov 15 at 17:04
Fiona IS a wrapper for OGR github.com/Toblerity/Fiona
– lusitanica
Nov 15 at 19:27
...and Shapely is a wrapper around GEOS C++. Both projects exist because original SWIG generated OGR python bindings are not very "pythonic" (there's not even a documented API, the only documentations available is OGR C++ API)
– lusitanica
Nov 15 at 22:11
Anyway, it doesn't hurt you trying to read/write a GML/KML and see what happens. Just don't go thinking that because drivers are not listed, functionality isn't there... as you said different lines are printing different drivers. Besides, drivers() lists only pertains to Read support.
– lusitanica
Nov 15 at 23:36
|
show 1 more comment
up vote
1
down vote
up vote
1
down vote
In order to read both KML and GML file formats the OGR binaries distributed with the Fiona implementation you're using need to be compiled against libexpat or Xerces (XML parsers). If these libraries exist in the same installation where the ogr.dll (Windows), ogr.so (Linux) used by Fiona is, then read support is most probably available. If no, then only write support will be available.
In order to read both KML and GML file formats the OGR binaries distributed with the Fiona implementation you're using need to be compiled against libexpat or Xerces (XML parsers). If these libraries exist in the same installation where the ogr.dll (Windows), ogr.so (Linux) used by Fiona is, then read support is most probably available. If no, then only write support will be available.
edited Nov 16 at 1:16
answered Nov 14 at 5:14
lusitanica
32319
32319
Does it mean that we should use GDAL/OGR to work with most of the vectorial formats and only use Fiona to work with the very few formats avalaible according to (fiona.supported_drivers? This way Fiona is very limited, isn't it? is there any way I can make Fiona work with other formats like GML o KML? What profesionals usually do? Thanks
– Daniel
Nov 15 at 15:06
I guess Fiona's main purpose is to provide data to Shapely. As Shapely is not able to read many formats, Fiona doesn't need to write in many formats either. If we want to transform data between different vectorial formats it's better to use OGC. However, we can use OGR to provide data to Shapely too so most of the time it's worth it to work with OGC instead of working with Fiona. I would appreciate some opinions about that. Thanks
– Daniel
Nov 15 at 17:04
Fiona IS a wrapper for OGR github.com/Toblerity/Fiona
– lusitanica
Nov 15 at 19:27
...and Shapely is a wrapper around GEOS C++. Both projects exist because original SWIG generated OGR python bindings are not very "pythonic" (there's not even a documented API, the only documentations available is OGR C++ API)
– lusitanica
Nov 15 at 22:11
Anyway, it doesn't hurt you trying to read/write a GML/KML and see what happens. Just don't go thinking that because drivers are not listed, functionality isn't there... as you said different lines are printing different drivers. Besides, drivers() lists only pertains to Read support.
– lusitanica
Nov 15 at 23:36
|
show 1 more comment
Does it mean that we should use GDAL/OGR to work with most of the vectorial formats and only use Fiona to work with the very few formats avalaible according to (fiona.supported_drivers? This way Fiona is very limited, isn't it? is there any way I can make Fiona work with other formats like GML o KML? What profesionals usually do? Thanks
– Daniel
Nov 15 at 15:06
I guess Fiona's main purpose is to provide data to Shapely. As Shapely is not able to read many formats, Fiona doesn't need to write in many formats either. If we want to transform data between different vectorial formats it's better to use OGC. However, we can use OGR to provide data to Shapely too so most of the time it's worth it to work with OGC instead of working with Fiona. I would appreciate some opinions about that. Thanks
– Daniel
Nov 15 at 17:04
Fiona IS a wrapper for OGR github.com/Toblerity/Fiona
– lusitanica
Nov 15 at 19:27
...and Shapely is a wrapper around GEOS C++. Both projects exist because original SWIG generated OGR python bindings are not very "pythonic" (there's not even a documented API, the only documentations available is OGR C++ API)
– lusitanica
Nov 15 at 22:11
Anyway, it doesn't hurt you trying to read/write a GML/KML and see what happens. Just don't go thinking that because drivers are not listed, functionality isn't there... as you said different lines are printing different drivers. Besides, drivers() lists only pertains to Read support.
– lusitanica
Nov 15 at 23:36
Does it mean that we should use GDAL/OGR to work with most of the vectorial formats and only use Fiona to work with the very few formats avalaible according to (fiona.supported_drivers? This way Fiona is very limited, isn't it? is there any way I can make Fiona work with other formats like GML o KML? What profesionals usually do? Thanks
– Daniel
Nov 15 at 15:06
Does it mean that we should use GDAL/OGR to work with most of the vectorial formats and only use Fiona to work with the very few formats avalaible according to (fiona.supported_drivers? This way Fiona is very limited, isn't it? is there any way I can make Fiona work with other formats like GML o KML? What profesionals usually do? Thanks
– Daniel
Nov 15 at 15:06
I guess Fiona's main purpose is to provide data to Shapely. As Shapely is not able to read many formats, Fiona doesn't need to write in many formats either. If we want to transform data between different vectorial formats it's better to use OGC. However, we can use OGR to provide data to Shapely too so most of the time it's worth it to work with OGC instead of working with Fiona. I would appreciate some opinions about that. Thanks
– Daniel
Nov 15 at 17:04
I guess Fiona's main purpose is to provide data to Shapely. As Shapely is not able to read many formats, Fiona doesn't need to write in many formats either. If we want to transform data between different vectorial formats it's better to use OGC. However, we can use OGR to provide data to Shapely too so most of the time it's worth it to work with OGC instead of working with Fiona. I would appreciate some opinions about that. Thanks
– Daniel
Nov 15 at 17:04
Fiona IS a wrapper for OGR github.com/Toblerity/Fiona
– lusitanica
Nov 15 at 19:27
Fiona IS a wrapper for OGR github.com/Toblerity/Fiona
– lusitanica
Nov 15 at 19:27
...and Shapely is a wrapper around GEOS C++. Both projects exist because original SWIG generated OGR python bindings are not very "pythonic" (there's not even a documented API, the only documentations available is OGR C++ API)
– lusitanica
Nov 15 at 22:11
...and Shapely is a wrapper around GEOS C++. Both projects exist because original SWIG generated OGR python bindings are not very "pythonic" (there's not even a documented API, the only documentations available is OGR C++ API)
– lusitanica
Nov 15 at 22:11
Anyway, it doesn't hurt you trying to read/write a GML/KML and see what happens. Just don't go thinking that because drivers are not listed, functionality isn't there... as you said different lines are printing different drivers. Besides, drivers() lists only pertains to Read support.
– lusitanica
Nov 15 at 23:36
Anyway, it doesn't hurt you trying to read/write a GML/KML and see what happens. Just don't go thinking that because drivers are not listed, functionality isn't there... as you said different lines are printing different drivers. Besides, drivers() lists only pertains to Read support.
– lusitanica
Nov 15 at 23:36
|
show 1 more comment
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53249561%2fis-it-possible-to-read-gml-or-kml-files-with-fiona%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown