<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><span style="font-size: 12pt;">> nemesis ha scritto:</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-size: 12pt;"><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-size: 12pt;">> Yes, geodjango is in use. We use it to be able to do spatial queries
    and define areas and might be used to save links as lines too.</span><br></div><div style="font-family: 'times new roman', 'new york', times, serif;"><div style="font-family: 'times new roman', 'new york', times, serif;"><div class="y_msg_container"><div id="yiv3309098763"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">> I don't know the answer to the other questions because I started studying geodjango in the recent months and I'm no expert about it.<br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">I used geoDjango always with postgis, I never tried to use geoDjango without postgis. In my last projects I use pure Django.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new
 roman', 'new york', times, serif; font-size: 12pt;">I developed in postgis and after more then a year I decided that I really don't need it unless if I must save shapes/raster on DB or unless if I must do spatial queries on entities saved in DB. So in the last two webgis that I developed I decided to avoid postgis because I've found some pure python alternatives (ogr+wkt).</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">I've dump from postgis just the  spatial_ref_sys table. I use it for supporting reprojection and srs definitions; but nodeshot uses only EPSG 4326, so I really don't think that reprojections could be usefull, neither all the other stuffs coming with postgis.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family:
 'times new roman', 'new york', times, serif; font-size: 12pt;">It's a nice play but is very huge to backup and clone on other system with different software versioning, it could also oversize your DB more than you need and could became a cumbersome entertainer for DBA/sysadmin tasks. For this reason I decided that when I must use postGIS this must be decoupled, in settings.py I use flags to activate/deactivate postgis features in views.py.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br>> If you have a proposal to optimize thing go ahead and install it as
    you prefer and then let me see the result.<br>
    <br>I've installed it some days ago, I've not saved entities on DB yet so I've not understand how "lines" are managed. I can say that in projects that I'm developing I've found geoJSON very flexible and helpfull in most cases, I'm constantly replacing shapes file with geojson dumps and I render them with OpenLayers. I produce geoJSON objects with django models class methods, they simply returns a dictionary with all attributes and geometries dumped from a CharField that contains WKT polygons and others informations.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">as you can see from the next example geoJSON is very similar to WKT and viceversa. </div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">the geomet python library could also improve the task:</div><div
 style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><a popular example: from geojson to WKT></div><div><div>from geomet import wkt</div><div>point = {'type': 'Point', 'coordinates': [116.4, 45.2, 11.1]}</div><div>wkt.dumps(point, decimals=4)</div></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div>'POINT (116.4000 45.2000 11.1000)'<br></div><div><//a popular example></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">geoJSON it's faster to implement with OpenLayers, it could mangle the geometry and infinite attributes. Drawing the nodeshot lines with geoJSON could speeds up the querying of them, getting distance and other
 stuffs played directly in Openlayers, client side.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><code></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div><div>vectorLayer = new OpenLayers.Layer.Vector("Lines");</div><div><br></div><div>var myGeoJSON = { "type": "FeatureCollection",</div><div>    "features": </div><div>    [</div><div><br></div><div>        { "type": "Feature", "properties": { "LENGTH": 756.304000}, "geometry": { "type": "LineString", "coordinates": [ [ 18.105018, 59.231027 ], [ 18.104176, 59.230737 ], [ 18.103928, 59.230415 ], [ 18.103650, 59.230336 ], [ 18.103028, 59.230463 ], [ 18.102491, 59.230418 ], [ 18.101976, 59.230237 ], [ 18.100893, 59.230110 ], [ 18.100117, 59.230016 ], [
 18.097715, 59.230262 ], [ 18.096907, 59.230376 ], [ 18.096637, 59.230405 ], [ 18.096578, 59.230428 ], [ 18.096429, 59.230450 ], [ 18.096336, 59.230479 ], [ 18.096108, 59.230534 ], [ 18.095971, 59.230600 ], [ 18.095925, 59.230633 ], [ 18.095891, 59.230665 ], [ 18.094000, 59.231676 ], [ 18.093864, 59.231720 ] ] } }</div><div>        ,                   </div><div>        { "type": "Feature", "properties": { "LENGTH": 1462.390000}, "geometry": { "type": "LineString", "coordinates": [ [ 17.877073, 59.461653 ], [ 17.877116, 59.461598 ], [ 17.876936, 59.461507 ], [ 17.876936, 59.461323 ], [ 17.876773, 59.461098 ], [ 17.876430, 59.460885 ], [ 17.876413, 59.460553 ], [ 17.876576, 59.460280 ], [ 17.876575, 59.460078 ], [ 17.876762, 59.460060 ], [ 17.877371, 59.460042 ], [ 17.877808, 59.460046 ], [ 17.878641, 59.460046 ], [ 17.879010, 59.460078 ], [ 17.879337, 59.460044 ], [
 17.879526, 59.459878 ], [ 17.879749, 59.459563 ], [ 17.880058, 59.459538 ], [ 17.880435, 59.459503 ], [ 17.887550, 59.453608 ], [ 17.887696, 59.453430 ], [ 17.887971, 59.453150 ], [ 17.888221, 59.452843 ], [ 17.888246, 59.452721 ], [ 17.888435, 59.452609 ], [ 17.888470, 59.452568 ], [ 17.888517, 59.452410 ] ] } }</div><div>        </div><div>            ]</div><div>        };</div><div><br></div><div>map.addLayer(vectorLayer);</div><div>vectorLayer.addFeatures(geojson_format.read(myGeoJSON));</div></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"></code></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size:
 12pt;">in the previous example "var myGeoJSON" could be fetched also with an ajax GET, but even if we need realtime updates ajax just increases the number of connections to the server, so, if lines remains costant for all the navigation we could avoid ajax connections.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">If I could obtain a old backup of nodeshot datas I'd do a setup of the initial entities to re-create a simil-production platform. I could analyze, with your help, the features that we could enhance and other that we could introduce together.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">What improvements nodeshot needs ?</div><div><div>I started with
 OpenLayers stuffs but if we should go deeply, with fun... why not ?</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div></div></div></div> </div> </div>  </div></body></html>