<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 06/11/2014 09:49 AM, Finn Herzfeld
wrote:<br>
</div>
<blockquote cite="mid:53980A26.3000401@seattlemesh.net" type="cite">Ah,
turns out they do output GeoJSON, or something they call GeoJSON,
I havent verified it too much.<br>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://map.nycmesh.net/api/all?geojson">http://map.nycmesh.net/api/all?geojson</a><br>
<br>
</blockquote>
<br>
Unfortunately that is not serializable GeoJSON but it can be fixed
easily.<br>
<br>
Try this: <a class="moz-txt-link-freetext" href="http://geojsonlint.com/">http://geojsonlint.com/</a><br>
<br>
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.<br>
<br>
<blockquote cite="mid:53980A26.3000401@seattlemesh.net" type="cite">
I dropped that URL in and it still complains about lack of
configuration.</blockquote>
<br>
Yes, there are few config keys that need to be setup.<br>
<br>
put this in it:<br>
<br>
{<br>
"url": "<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://map.nycmesh.net/api/all?geojson">http://map.nycmesh.net/api/all?geojson</a>",<br>
"map": {}<br>
}<br>
<br>
this should pass validation, but it won't work because the output of
the URL is not standard GeoJSON<br>
(yeah, the empty map object is quite ugly.. :D).<br>
<br>
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.<br>
<br>
Once you have all this in place, you should run the command:<br>
<br>
<b>python manage.py synchronize</b><br>
<br>
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.<br>
<br>
There could be some issues, basically the map object is a map
between keys of the target urls and keys in nodeshot.<br>
<br>
I see for example that the GeoJSON issued by nodeatlas has objects
like:<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> "Contact": "Reddit: shotintoeternity",
"Details": "Home",
"OwnerName": "shotintoeternity",
"PGP": "0000000000000000",
"Status": 896
</pre>
"Details" could be mapped to the "name" key in nodeshot.<br>
<br>
While "Contact" could be "description".<br>
<br>
"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")<br>
<br>
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).<br>
<br>
The final config JSON should be:<br>
<br>
{<br>
"url": "<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://map.nycmesh.net/api/all?geojson">http://map.nycmesh.net/api/all?geojson</a>",<br>
"map": {<br>
"name": "Details",<br>
"description": "Contact"<br>
}<br>
}<br>
<br>
Federico<br>
</body>
</html>