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.

Inconsistency in PointField

See original GitHub issue

For gis PointField, we are accepting lat and long as numbers/floats but converting them from model field to json as strings. Here https://github.com/Hipo/drf-extra-fields/blob/master/drf_extra_fields/geo_fields.py#L64-L67

Input:

{
        "latitude": 49.8782482189424,
         "longitude": 24.452545489
}

Output:

{
        "latitude": "49.8782482189424",
         "longitude": "24.452545489"
}

Do we have any reasoning for this? I think we should output lat and long as floats.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
TehQuilacommented, Nov 9, 2017

hey @alicertel, I updated my PR accordingly, hopefully to your liking.

1reaction
yigitgulercommented, Nov 6, 2017

@alicertel proposed another approach. Assigning this issue to him.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Calculating distance between two PointField (s) - Why is my ...
I am trying to calculate the distance between two locations in miles however the result that I am getting is incorrect. The reason...
Read more >
Developers - Inconsistent ordering of sensor_msgs/PointField -
Components of sensor_msgs/PointField are displayed in inconsistent order: Screenshot from 2020-01-11 17-50-13. See More. View in GitHub. SOLVE ISSUE.
Read more >
Mapping of pointFields with topology changes - CFD Online
Point fields should be mapped automatically in the polyMesh::updateMesh(const mapPolyMesh& mpm) member function. Take a look at polyMeshUpdate.C ...
Read more >
Fix uninversioning of (single valued) PointFields & clean up ...
In getting caught up with the new PointsField work in SOLR-8396 & SOLR-9987 I realized: There's some inconsistencies/contridictions in how ...
Read more >
geodjango difficulties with srid - spatialite - GIS Stack Exchange
PointField(srid=4326, blank=True, null=True) ... Inconsistent Spatialite Update Behavior; SRID not allowed?
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