glenrobertson / django-geojson-tiles Goto Github PK
View Code? Open in Web Editor NEW[UNMAINTAINED] A simple Django view to serve GeoJSON tiles from a GeoDjango model
License: Other
[UNMAINTAINED] A simple Django view to serve GeoJSON tiles from a GeoDjango model
License: Other
Hey!
Playing around with a simple test app with leaflet-tilelayer-geojson occasionally some invalid geojson is returned.
E.g.
"{"crs": {"type": "link", "properties": {"href": "http://spatialreference.org/ref/epsg/4326/", "type": "proj4"}}, "type": "FeatureCollection", "features": [], "bbox": [[11.249999999999993, 40.97989806962015], [22.499999999999986, 40.97989806962015], [22.499999999999986, 48.922499263758255], [11.249999999999993, 48.922499263758255]]}{"crs": {"type": "link", "properties": {"href": "http://spatialreference.org/ref/epsg/4326/", "type": "proj4"}}, "type": "FeatureCollection", "features": [], "bbox": [[11.249999999999993, 40.97989806962015], [22.499999999999986, 40.97989806962015], [22.499999999999986, 48.922499263758255], [11.249999999999993, 48.922499263758255]]}"
I think a proper response should only return one record, i.e.
"{"crs": {"type": "link", "properties": {"href": "http://spatialreference.org/ref/epsg/4326/", "type": "proj4"}}, "type": "FeatureCollection", "features": [], "bbox": [[11.249999999999993, 40.97989806962015], [22.499999999999986, 40.97989806962015], [22.499999999999986, 48.922499263758255], [11.249999999999993, 48.922499263758255]]}"
I suspect, that somehow different json queries are concatenated, but
I really have no glue, how to analyse deeper as I'm pretty new to django..
Any hint is appreciated..
Cheers
Toby
Depending on pillow instead would easy the install process. Right now PIL wants me to --allow-external which would not be required with pillow. But maybe you have reasons to rely on PIL.
$ pip install fandango-geojson-tiles
Downloading/unpacking django-geojson-tiles
Downloading django-geojson-tiles-0.1.2.tar.gz
Running setup.py (path: ... ) egg_info for package django-geojson-tiles
Requirement already satisfied (use --upgrade to upgrade): django in /lib/python2.7/site-packages (from django-geojson-tiles)
Downloading/unpacking PIL (from django-geojson-tiles)
Could not find any downloads that satisfy the requirement PIL (from django-geojson-tiles)
Some externally hosted files were ignored (use --allow-external PIL to allow).
Cleaning up...
No distributions at all found for PIL (from django-geojson-tiles)
Storing debug log for failure in pip.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.