question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for GEOS API types-- PointField, PolygonField etc.

See original GitHub issue

Can we add support for fields offered by django.contrib.gis.geosGEOS. django-graphql-geojson package comes closest to solving the problem, however, the particular implementation has a major drawback that it converts the whole model into GeoJSON, which causes problems with external interfaces which are defined on non-geometric fields. (May also break internal ones.)

Converting GEOS fields into GeoJSON should more than sufficient for most use cases because it provides you with pre-built interfaces and filters on non-geometric types.

How would one go about adding support for serialization of these fields? Having gone through the codebase-- adding them to converter.py coupled with tests.py should be sufficient or am I missing something?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jkimbocommented, Mar 13, 2020

Looks like https://github.com/EverWinter23/graphene-gis solves this issue (thanks @EverWinter23 ). I’ve created a PR to add it to the documentation: #902

0reactions
stale[bot]commented, Mar 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GEOS API - Django documentation
Returns whether or not the set of points in the geometry is empty. GEOSGeometry. geom_type ¶. Returns a string corresponding to the type...
Read more >
Designing A Geospatial Rest Backend Using GeoDjango
A complete module on how design a Geospatial Backend which can conduct map analysis using Django.
Read more >
When to use GeometryField? - geodjango - GIS Stack Exchange
A GeometryField can hold either a Point , a LineString or a Polygon . An example: Your table holds information about parks in...
Read more >
Creating Spatial REST APIs in 25 minutes with GeoDjango
This talk explains the easy and effective way to develop REST API within a couple of minutes using GeoDjango and Django Rest Framework....
Read more >
Make a Location-Based Web App With Django and GeoDjango
PolygonField is used for storing GEOS Polygon objects and so on. ... It adds support for geographic objects allowing location queries to be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found