[Nodeshot] External GeoRSS layer configuration?

Finn Herzfeld finn at seattlemesh.net
Wed Jun 11 11:09:19 CEST 2014


Ahh yes! I sorta-kinda got it to work. The configuration you specified
was giving errors when I tried to synchronize, so I ended up using this one:

{
    "map": {
        "name": "OwnerName",
        "description": "Details"
    },
    "url": "http://meshwith.me/nyc.geo.json"
}

I put the proper GeoJSON up there obviously, and as you saw I filed a
bug with NodeAtlas about their GeoJSON not actually being GeoJSON. I
would like to get some sort of hook system so that they can tell us when
they have a new node and have it either run the synchronize command, or
just have the new node data sent to us.

Finn Herzfeld
Seattle Meshnet Project

On 06/11/2014 01:43 AM, Nemesis wrote:
> On 06/11/2014 09:49 AM, Finn Herzfeld wrote:
>> Ah, turns out they do output GeoJSON, or something they call GeoJSON,
>> I havent verified it too much.
>>
>> http://map.nycmesh.net/api/all?geojson
>>
>
> Unfortunately that is not serializable GeoJSON but it can be fixed easily.
>
> Try this: http://geojsonlint.com/
>
> Report to the devs this issue, we had a similar issue in nodeshot too
> and we had to standardize the output so that other applications using
> GeoJSON would work out of the box.
>
>> I dropped that URL in and it still complains about lack of configuration.
>
> Yes, there are few config keys that need to be setup.
>
> put this in it:
>
> {
> "url": "http://map.nycmesh.net/api/all?geojson",
> "map": {}
> }
>
> this should pass validation, but it won't work because the output of
> the URL is not standard GeoJSON
> (yeah, the empty map object is quite ugly.. :D).
>
> To test the importer you can do something easy: copy only what is
> inside the "data" key, that's serializable GeoJSON, test it in
> geojsonlint.com to be sure it ok, then save it on a file (I did it now
> as example and I attached the file nycmeshnet.geojson) and put it on a
> public server, then insert the URL of that file in place of
> map.nycmesh.net/api/ecc.
>
> Once you have all this in place, you should run the command:
>
> *python manage.py synchronize*
>
> It is not still possible to launch this action from the web interface,
> but it should be fairly easy to implement so somewhen soon will be
> available.
>
> There could be some issues, basically the map object is a map between
> keys of the target urls and keys in nodeshot.
>
> I see for example that the GeoJSON issued by nodeatlas has objects like:
>         "Contact": "Reddit: shotintoeternity",
>         "Details": "Home",
>         "OwnerName": "shotintoeternity",
>         "PGP": "0000000000000000",
>         "Status": 896
> "Details" could be mapped to the "name" key in nodeshot.
>
> While "Contact" could be "description".
>
> "Status" is a bit more difficult to map because you should have
> corresponding statuses in your database with the same slug as the ones
> in the target GeoJSON (in this case a status with slug "896")
>
> If the importer doesn't find a valid corresponding status it will use
> the default status (which by default is Potential but you can change
> it from the web ui if you need).
>
> The final config JSON should be:
>
> {
>      "url": "http://map.nycmesh.net/api/all?geojson",
>      "map": {
>          "name": "Details",
>          "description": "Contact"
>     }
> }
>
> Federico
>
>
> _______________________________________________
> Nodeshot mailing list
> Nodeshot at ml.ninux.org
> http://ml.ninux.org/mailman/listinfo/nodeshot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ml.ninux.org/pipermail/nodeshot/attachments/20140611/df9258ad/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://ml.ninux.org/pipermail/nodeshot/attachments/20140611/df9258ad/attachment-0001.sig>


More information about the Nodeshot mailing list