Using earth engine as a processing step for raster data - google-earth-engine

We have raster data that we want to process using earth engine and then use that data in another cloud environment. All this should happen programmatically. So manual tools like the asset manager are out. I could not find an API to expose its functionality.
Is there an earth engine API we could use to import and export raster data?

If I understand correctly your question, you want to use google earth as a map/tile provider. Long long time ago in a galaxy far away, there used to be some years ago this crazy Russian hacker (in the good sense) that had created code to get tiles, however this was not exactly legal, and i am not sure if it is maintained.
If you want to use Google, you should have to go through their APIs (unless there is a solution involving caching in a limited space, e.g. like this?) and should use some google API earth-engine, maps, ...? (I am a bit rusty on the current satus)
Be also aware that what they provide changes over time and is not / will not be always free.
For alternatives, which are free and open, this might be helpful for maps (also google open street maps).

All of Earth Engine is API driven, however some portions of the API are easier to access than others.
For automated imports, you can try using the earthengine command line tool, which formats the API calls for you: https://developers.google.com/earth-engine/command_line
For exports, the easiest path is using the Python client library and the ee.batch.Export calls.

Related

react-native-maps support offline google maps

I am new to react-native, and I am going to develop an application by using third-party library called react-native-maps. Currently, everything just working find with online map as this third-party library is used google map. But my problem is went I move to offline mode it would be caused a problem for my application.
My question is there any possible way to make google maps downloaded/cached when the application is load with the specific bound area of a country?
Thank you in advance.
As far as I am aware there is not a way to use the react-native provided MapView to cache the map data. At this time the only offline react-native module that supports offline mapping is react-native-mapbox-gl. I have used it in one of my projects and it is fairly simple to get up and running. The biggest issue with this project is it is still very pre v1.0 in terms of bugs. For basic cases it gets the job done.
Another project I have found has a lot of great features and has a snapshot function that I think could be used to mimic an offline map. I have not tried this but I am evaluating it at this time. react-native-maps
It would function as such:
The app can set aside a cache of a maximum size.
As the app requests tiles, these are cached to local storage.
There is an interface on the map object that enables you to cache a particular tile in the map at a particular zoom level.
The app periodically scans the cache and deletes items in LRU order until it gets under the maximum cache size.
Let me know if the maintainers would accept a pull request like this and I can work on it.

How to display a query results from Open CMIS, Alfresco?

Newcomer to Alfresco and Web Development here, so bear with me. I've so far installed Alfresco and was able to use the Maven AMP archetype to create my own custom content model for the data I need to store in it. Now I need to access this data from an external site by querying the Alfresco repository.
I've followed what I can find on CMIS and was able to execute a query using curl and get the results I expect in a large XML stream. My colleague was having an uphill battle trying to interpret these results using Coldfusion. Now I searched around, and understand that to interpret these results and make the process a bit easier, it is better to use some kind of client like Open CMIS (or Chemistry, I'm still a bit confused on the terminology here).
We've so far tried the the PHP client, but received some errors from the xmlLoad function not reading 'nbsp' characters. PHP seemed like the easiest version to implement, though we're considering moving to Java if that works better. However, we've seen very scarce documentation on either end. Are there some better examples that we may have missed or maybe some other way to do this? Seems like this should be simple to implement, yet it's given us quite the stall due to the brick wall that Alfresco and CMIS seem to be.
If you don't want to use a library, the CMIS Browser Binding might work better for you. It returns JSON instead of XML.
Try:
http://<host>/alfresco/api/-default-/public/cmis/versions/1.1/browser?cmisselector=query&succinct=true&q=SELECT * FROM cmis:document
Shouldn't be a brick wall at all. Here are some resources:
The custom content types tutorial has a section on CMIS,
including CMIS queries which may be helpful to you even if you do not need custom types
The CMIS & Apache Chemistry book from
Manning is a good resource (disclosure: Florian and I co-authored it
along with another colleague, Jay Brown)
There are some Java examples on Google Code
There are additional resources and helpful links on the Alfresco CMIS page

offline map for a web based (ASP.Net) application

I'm developing a web based application where I need to overlay some color layers over each country or city . I know that I can use Google maps but the problem I have is that the server where we're deploying the app doesn't have access to the internet .
so I need a map component like Google maps which I can use it offline , can any one suggest any component that I can use ?
You might check out openstreetmap. There you could download the planet.xml file for the whole world or specific files only for the regions you want to serve. Good material can be found also here: www.geofabrik.de
Then you will have to set up your own tileserver, which will crunch png-tiles for the xml-files provided and store all png-maps on your local harddrive.
The tileserver will probably have some web-api also. So your tileserver may run on localhost:8080 or another port, and your website runs maybe on apache on port 80.
Then you would use some web-framework to access your own tileserver. This framework would be
probably http://openlayers.org/ which can also draw shapes onto maps.
As a tileserver-location, you would add the address to your local installed tileserver. Openlayers will then receive the crunched tiles and do some stuff with it.
So, you have to at least once get some information from the internet (planet.xml) and crunch your data. But be aware that this crunching might take a long time depending on how many countries you want to serve and also these png-files will take a lot of space.
Check out openstreetmap.org how to do all this, including some numbers.
Maybe it is even possible just to download the crunched tiles from openstreetmap and put them in a specific order and fire up a tileserver pointing to these tiles. This would probably much easier.
You cannot download the Google-Maps tiles and serve them in your own tile-server, since there is a license restriction on them.
Greetings,
Jan
You're going to find that difficult because the map data alone could take up several hundred megabytes of space to store. The OS provides offline mapping within the UK which they provide free but it is limited and you'll have to manually integrate it into your site.
Having a web-based application that can't access the internet seems a bit daft to me, surely there's a way around that?

bing maps cost money?

I am building a new web site in asp.net, and im newbie with using maps.
For my web site i will need the following functionality:
display a map of specific location.
display route map between two or more location
calculate distance between 2 locations.
I found most of the functionality at the Bing Maps interactive SDK site:
and it works fine.
My questions are:
does it cost money to use this SDK ?
for the third task, i understand that i will have to use MapPoint Services.
(is there another way??) does it code money to use it?
I will really appreciate it if you dont send me links, cause my english is not the best one...
thanks a lot
It sounds like you're at the decision making stage of your project and weighing up the pros and cons of various frameworks. Due the nature of developing commercial applications using maps (supplied by Google, Bing, Yahoo, or any other map provider), it might be an idea to code against a library called MapStraction.
It allows you to easily swap and change map providers depending on commercial and/or customer requirements. It also provides a consistent interface so changing your map provider half way through the project isn't a big deal.
Have a look at using OpenStreeMaps. It's completely free, and so far I have been very impressed with it. In my area, it's more accurate and detailed than Google maps.
In the UK OS maps are also free.
Bing Maps is a good option. If your website is public and the map is publically available, then you can make use Bing Maps for free if you have less than 125,000 page views (similar to a session) of your map page in a year as noted here: http://www.microsoft.com/maps/product/licensing.aspx
If you expect a higher volume of usage then you would need a license. Note that Bing Maps licenses tend to be cheaper the Google licenses. This is pretty neat as Bing Maps has much more data than Google.
Also, MapPoint Web Services are not need, nor do they exist anymore.
Read the licenses carefully, both Bing and Google Maps cost money, if you use it for commercial purpose.
E.g. read this blog post:
http://www.47hats.com/2009/07/google-maps-the-10k-gotcha/
However, if you using it for your non-commercial app, it is free.
Another option to consider for those looking at this thread is Azure Maps, Microsoft's newer enterprise mapping platform. It usually costs less than Bing Maps and provides more features and services. It is also a part of Azure which make things a lot easier if you are already developing in Azure. Find more information at https://azure.com/maps
You can do all of that using just Bing Maps. The Bing Maps routing service can b sued to calculate the driving distance between two locations. If you want the straight line (as the crow flies) distance then it's just a simply calculation.
For Bing Maps you will always need a license, however there are free licenses. If you qualify for free usage depends on your use case. There's a good tool available for figuring out if you need an Enterprise license or if you qualify for free usage here: http://www.microsoft.com/maps/Licensing/licensing.aspx

Data from Google Analytics

So Google Analytics does not have an API that we can use to get our data, so is there an efficient way to programaticly fetch the data collected by Google, without logging it locally?
Edit:
I would prefer a Python or PHP solution but anything will work.
Google just announced that they're making available a data export API for Google Analytics. It sounds like that's exactly what you're looking for.
Per their announcement, the feature's currently in private beta, but I figure it'll be rolled out to all accounts in coming weeks/months. Depending on your needs, you may just want to wait, instead of building a short-term hackish solution.
If you're interested, I presume that the functionality's being rolled out first to members of the Google Analytics Trusted Tester program.
Also, I forgot about this: I never actually completely implemented this for a client because the deal fell through...
But you can customize the dashboard to include the sections of Google Analytics that your report might need and have a scheduled email. If the reports do not need to be too detailed and if Google already aggregates the data in the way you need it, then this might work for you.
The Google Analytics API is now open to everyone and looks like it contains the full data set
Well, it depends on what you want to do with the data. If you only want to process part of it, then I don't think it is difficult.
Here's a basic web search with a hit explanations from Google and someone else:
http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55561
http://blogoscoped.com/archive/2008-01-17-n73.html
There is a completely programmatic way to access the data using greqo(PHP), but the analytics class is in beta. Check it out here.
If beta is not acceptable, you can use a mixture of the XML and Yahoo Pipes to get what you need.
Basic Method
Obtain the tracking data in a usable
format – We can schedule Google
Analytics to email this as an XML file
on a regular basis.
Make the XML file accessible online –
By emailing an attachment to Google
Groups, the file is automatically
given a public URL.
Work out the URL of the most recent
report – Since Google Groups provides
RSS/Atom feeds for all messages, we
can easily find the URL of the most
recent message and therefore work out
the URL of the XML report.
Prepare the data for use – We need to
manipulate the XML and massage it into
a handy JSON format that we can use on
our blog, which can all be done using
Yahoo Pipes.
Taken from here.
I implemented a solution where we scheduled the analytics report to be emailed to a gmail account each day and I pulled the report on demand via POP3. It's pretty easy and works fast. I've heard Epic1 will do this for you as well. I'm researching that now.
If you're using Python, Pandas io is also very helpful. Pandas has an interface on top of the Google Analytics API. It's pretty simple to get up and running and integrates with Pandas so you get the aggregation, time series features, and other data analysis library features.
instructions on how to authenticate and shows examples: http://blog.yhathq.com/posts/pandas-google-analytics.html
more examples: http://quantabee.wordpress.com/2012/12/17/google-analytics-pandas/
I've also posted a few queries to get started
https://github.com/sk8asd123/ga_pandas
Its been a while since I had to deal with this, but Google Analytics has an XML output type, so you can parse that to get the data in your own system. However, I believe that there is no way to get the xml file programatically, so someone still has to go in and generate the file and feed it to your app.
Good question though, I'd love to see if there is a 100% automated solution.
We just released a product - Megalytic - that makes it very easy to create custom reports using data from the Google Analytics API. You can email these reports to others without sharing your Google Analytics account. Also, create links to reports, download as PDF, etc.

Resources