Building a geo focused app: what should I know? - javascript

I am looking forward to build an application that relies heavily on geographic data.
The application will use HTML5's ability to get GPS data and will do computations such as finding the nearest street, finding the shortest path between 2 points, etc. I was thinking of using a platform such as Google Maps, so it will most likely be written in Javascript. However, I might off load the client's CPU by doing the heavy computations server side (possibly in C++ or a scripting language).
Is there any technology, framework, standard, etc. that I should know about before I start coding?

Many SQL based relational databases have spatial awareness that can help with GPS coords.
MySQL's spatial extensions are one example. Here is an article on it. I gather if you can convert GPS data to spatially related fields then you can do things like select the nearest row to another or the first northerly row ...

Make sure to understand projections and geographic datum correction. How you do it will depend on your choice of technologies, obviously, but if you don't understand those issues they will bite you badly.

You can find my glowing review of the Google Maps API here.

Related

API for Trend Forecasting Javascript

I have a list of values over time (basically a list of integers).
Currently the NPM website is down so I can't really search for API's properly, therefore I am asking if any of you know an API for Javascript Node which takes an input of a list of integers (representing y coordinates on a graph) and can then make a prediction of how the graph will continue to flow.
Thank you very much for any responses!
It depends on how you want to make a prediction. You can calculate a linear regression, fit a time series model, train a neural network, etc.
The easiest is a linear regression model. It won't be very accurate; just give you a sense of direction as to where the data is going at the current time.
Time series modelling (autoregression) is probably what you are looking for. This usually involves using historical data to fit a model that can be used to predict (referred to as forecast) future values. This involves some fairly heavy lifting with statistics, but JavaScript libraries do exist, like timeseries-analysis.
If you want to create a fully-blown neural network, tensorflow is being developed for JavaScript, but I wouldn't recommend this approach unless you have a fairly good understanding of machine learning. In order to make an effective forecaster with a neural network, you need to be able to properly normalize data and write a recurrent network; not a basic topic by any stretch of the imagination.

How to render point cloud data in browser with iTowns2

I am attempting to use iTowns2 (https://github.com/iTowns/itowns2) to visualize point cloud data in the browser. According to the README: "[iTowns'] first purpose was the visualisation of street view images and terrestrial lidar point cloud."
From this I glean that there should be instances of people using iTowns to visualize point cloud data somewhere online. I've been looking for days and I can't find an example of someone using iTowns2 to visualize point cloud data in the browser.
The example in the GH repo renders a globe in the browser but no point cloud. There is a iTowns/iTowns2-sample-data repo which has a bunch of point cloud data but no instructions on how to use the data or references to other resources.
Has anyone used this package to show point cloud data in the browser? Does anyone know an article or resource that demonstrates doing this with iTowns2? Does anyone know of a different library for rendering point cloud data with examples and/or better documentation?
Ideally I would be able to track down the source code for something like this: http://www.itowns-project.org/#demo
The documentation is quite ambiguous, and judgind by the Github issues it looks like the library is under heavy refactoring.
I took a quick look to this repo and realized that it is just using Potree for point cloud visualization:
http://potree.org/
So you can just use Potree directly. Wich is better documented.
In addition to this, it's quite trivial to set up your own point cloud visualizer using Three.js.
Just take a look at the Points object:
https://threejs.org/docs/#api/objects/Points
And this example:
https://github.com/mrdoob/three.js/blob/master/examples/webgl_buffergeometry_points.html
Three.js also includes some 3D format loaders, like ply:
https://github.com/mrdoob/three.js/blob/master/examples/webgl_loader_ply.html
If you are interested in using las files you might also want to look at:
https://github.com/verma/plasio
Let's provide a early 2018 update! (source: I'm a maintainer)
iTowns now supports visualizing pointclouds directly. You can test it here: http://www.itowns-project.org/itowns/examples/pointcloud.html
If you want to test your own data, please visit http://www.itowns-project.org/itowns/examples/pointcloud.html?selector=1
We currently support results from PotreeConverter, and lopocs. We plan to add 3dtiles pointcloud format soon.
We indeed used potree for pointclouds before, but that was not ideal, a bit because we diverge on some technology/design choices, but mainly because using potree prevented us to tightly integrate pointcloud visualization in iTowns. For instance, iTowns stops its rendering loop when it has nothing to do (saves a lot of cpu), and potree does not. It also allows us to implement our own culling/SSE/network priority... heuristics.
Potree has currently better graphic post-treatments of pointclouds, although we also plan to add EDL and other improvements (occlusions for instance) soon. And of course, the advantage of iTowns is that it's not limited to pointclouds, but can display a variety of data type, from rasters to vectors, see the examples page and especially this example of a pointcloud on a globe.
But the main difference between these 2 projects is that Potree aims at being a standalone viewer (AFAIK), whereas iTowns is more a framework to implement your own app! Potree remains a big source of inspiration for us concerning pointclouds, big kudos to their maintainer :-)
(Btw, the github has moved to https://github.com/iTowns/itowns)

python data analysis overlay image of US

I am familiar with coding in python for the work I do in bioinformatics. I've recently been asked to do a different type of analysis -- analyzing data and then overlaying that data over a map of the US. I figure I will need to use javascript after I write the python code to do the data analysis, but I am not familiar with creating images. What is the best way to incorporate my python data analysis with code that will produce a dynamic image?
Thanks for your help.
My Solutions
1) Just as what what other people said , you could try to use the Google Map APIs and code a bit.
2) Or you can use Openstreetmap. I would perfer openstreetmap.
I did several apps and websites based on LBS. I know how to place coordinates on maps.
If you want to finish this quickly and cooler. You may try this combination:
Django as the freamwork,
PostgreSQL as the DB backend
PostgreSQL PGIS as the geolocation handler
Openstreetmap as the map viewer
My summery:
Solution 1) is quick, faster. It needs you some hard-coding efforts.
Solution 2) is bit slower but full-featured. It's very extensive for future developing.
Hope this could help you

Google Maps API - Get Property Boundary Data

I am looking for a way to extract built in property boundary data from the Google API to know where to highlight areas for information needs.
It's easy enough drawing a polygon, but I want to know where to draw it in a more automated fashion. Perhaps similar to Geocoding for extracting an address location, except the geocoder only provides a central coordinate and a bounding box (for screen navigation) unfortunately.
Does Google provide this property data in some form?
Thanks
Having looked through the Maps APIs fairly extensively and no one suggesting otherwise. I think it's pretty conclusive Google Maps does not provide property boundaries.
The best way to go is to look for a service that does have the data to integrate into Maps, but likely costs money.
As an example these may be:
Your local government's land services
RPData.com - http://www.rpdata.com/residential_property_information/residential_property_information.html
ReportAllUSA.com (if you are American) - http://reportallusa.com/
None of these are guaranteed, looking into them myself, but may also be different from person to person depending on costs. If I find a free one, I'll give a shout.
For anyone looking to implement this on Australian Region.
State & Local councils have open data free for usage.
I am working with Brisbane, QLD Australia:
For Brisbane: https://www.data.brisbane.qld.gov.au/data/dataset?q=parcel
For QLD: https://www.data.qld.gov.au/dataset?q=parcel
P.S parcel dataset contains information about individual Property Listings. It does have a learning curve & takes sometime to use open data.

Robust open source Node.js based projects for learning?

I'm working on learning particular node.js (specifically tower.js). I'd like to see some very robust open source application examples that revolve around more complex scenarios, particularly in the mapping area. I've not found a solid example as of yet that I feel I can sink my teeth into, but I'm hoping someone may point me towards a Google Maps or Open MapQuest style application that's built atop node if possible.
Any suggestions in this vein? Any robust example app is fine, simply one of those scenarios would be much more apropos.
I've been working on an Open MapQuest based application on Node.js myself. This is the best full-stack reference I could find: Node.js, Express, Leaflet, PostGIS. But it's far from robust; in fact, it's vulnerable to SQL injection!
In general, you'll need two things:
a client-side map renderer like Leaflet, which is incredibly awesome.
a geospatial database like MongoDB, which has builtin geospatial indexing and which I'm using, or PostGIS which they used in that tutorial.
Then, just follow a Tower tutorial, and create a RESTful endpoint that queries nearby items of interest given a longitude and latitude. You probably won't be able to use Tower Models, since they don't support geospatial queries AFAIK. On the client side, check if your map's been moved, and fetch the endpoint to update nearby items.

Categories