Hi,
I've been hacking on the OAM imagery index again. Here's what I've done
so far this morning:
API-side:
1. Fixed the 'resolution' on images which broke the API (oops). Images
now have a resolution based on their height/width and the geographic
area they cover. (thx to schuyler, i think, for the implementation)
2. Fixed /layer/59/ so it actually worked and returns just that layer
object.
3. Fixed the /image/ API to be an order of magnitude faster; fetching
10000 images from the /image/ path is now under 3 seconds for
time-to-first-byte for me. (Before it was more like 30.) Fetching
1000 records is under 1 second.
As a side effect, this API is now limited to a subset of the information
that was previously available. (Specifically, license and mirror
information is no longer available by default.) Some of this can
probably be brought back given time; at the moment I was
approaching a bare minimum of information.
The real performance hog here is, I believe, creating model instance
objects to use for serializing; using .values() in django to select
specific fields instead is where almost all of the speedup comes
from.
If you want more information in this API -- rather than having
to do subsequent fetches to get more information -- we should talk
about it on this list to see what the information/time increase
trade off is.
4. Modified the 'layer' API so you can post just a single piece of information
-- like title, description, or images array -- rather than the entire
JSON object, when performing updates.
UI-side:
1. Added a layer browser:
http://oam.osgeo.org/layer/ -- this also has text search,
http://oam.osgeo.org/layer/?q=landsat , though it doesn't
search descriptions yet.
2. Did the same speedup I did in the API for layer pages:
http://oam.osgeo.org/layer/59/onearth-landsat-7-321-pan/ now
loads in under 1 second locally.
3. Added navigation between layers;
http://oam.osgeo.org/layer/56/blue-marble-ng-topo-bathy-apr-2004/ links to
both http://oam.osgeo.org/layer/57/blue-marble-ng-topo-bathy-may-2004/ and
http://oam.osgeo.org/layer/55/blue-marble-ng-topo-bathy-mar-2004/
4. Added links from images back to the layers they're part of, so
http://oam.osgeo.org/image/9878/ links to
http://oam.osgeo.org/layer/10/wisconsin-naip-2010/
5. Added display of mirrors, so http://oam.osgeo.org/image/1921/
shows that there is one mirror of this content available.
6. Added login links in the upper right of every HTML page
7. Added support for inline editing of Title/Description of
layers for logged in users: when a user is logged in, they
can click on the title or description and it will allow them to
edit it.
-- note that logins are based on OSGeo Userids; you can get an
OSGeo Userid at
https://www2.osgeo.org/cgi-bin/ldap_create_user.py
Next steps for the UI:
1. Visualizing images + layers in simple maps throughout the site
2. Adding support for adding and removing layers from images
in the web UI. (This is already possible through the API.)
Next steps for the API:
1. Add support for 'tags' (key/value pairs) on layers (and possibly
images, though that feels less urgent, since images aren't really
things that humans typically interact with individually).
-- Chris
_______________________________________________
talk mailing list
[email protected]
http://openaerialmap.org/mailman/listinfo/talk_openaerialmap.org