What about other formats? GPX, KML, GeoRSS, ecc

107 views
Skip to first unread message

Federico Capoano

unread,
Jul 15, 2015, 11:26:20 AM7/15/15
to django-rest-...@googlegroups.com
Hi all,

in one project we feel the need of supporting more formats. That would be really great, although there are a few technical and architectural issues:
  • drf-gis is designed with geojson in mind only
  • other formats like KML can contain a lot of other different information, like color
  • georss could be quite simple to implement although is not used a lot, (but is good for backward compatibility)
  • I don't know much about GPX but several people expressed the need
  • I don't have a clue how filters would play out, maybe some of them could still work with other formats
Anyone else interested in this?

Federico

Jesse Crocker

unread,
Jul 15, 2015, 11:48:48 AM7/15/15
to django-rest-...@googlegroups.com
Currently I use drf-gis for rendering GeoJson, but use custom views for rendering GPX and KML. I like the idea of being able to get rid of these views and use drf-gis for them instead, but it seems like there are some architectural issues to work out. I think some formats might make sense to be write(serialize) only.

GPX can only contain a specific set of fields, so the right way to do the mapping would have to be worked out. GPX has 2 different types that can represent a linestring, a track and a route. GPX tracks frequently include time, there are 2 different ways time is frequently stored in postgis, either as an m coordinate, or as an array on ints.

Shapefiles seem like an obvious format to add, and could be serialized and deserialized, but the limitation of the length of field names will either require some slightly complex logic to get right automatically, or manual mapping from field names to upper case 8 char field names.

-
Jesse

--
You received this message because you are subscribed to the Google Groups "Django REST Framework GIS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framew...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Federico Capoano

unread,
Jul 17, 2015, 4:02:01 AM7/17/15
to django-rest-...@googlegroups.com, je...@gaiagps.com
I jesse, thank you for your feedback.

You're very right in the sense that there are quite a few architectural issue to consider. That's mainly because drf-gis has grown up organically, mostly with trial and error, features have been added by several different people, and the most amazing fact is that they work pretty well :-) - BUT - we can surely do better!

If we start adding supports for more formats, one thing I would definitely like to have, is a better organization of files, i mean something like a directory for each format supported, and some shared base classes. 

I've been looking out for other apps that do similar things and interestingly I've found this one: https://github.com/bkg/django-spillway

From this app, I first would like to try the KML serializer.
Then I'd like to try the GeoJSON serializer and compare its performance to drf-gis, which is likely to be better.


Take a look and let me know what you think.

Federico

Ryan Gartin

unread,
Feb 8, 2019, 1:17:43 AM2/8/19
to Django REST Framework GIS
Any update on this?
Reply all
Reply to author
Forward
0 new messages