Exporting a global map from google earth engine - export

How does one export a global map from Google Earth Engine. I tried setting the bounding box to the following coordinates -180, -90, 180, 90 and what I get is a single column of data. I need these data at a resolution of 1km and 5 km. If this is not possible, what is a work around?
Thanks,
Rekha

Found the answer here. It involved creating a non-geodesic polygon as described in this link below.
https://gis.stackexchange.com/questions/427210/how-do-i-download-global-hansen-global-forest-change-data-from-gee

Related

Can map points be entered in Postgis by clicking on the map in QGIS?

I have a Postgis table of about 200 entries for which I have to enter lat/lon coordinates. I use QGIS to process and display them. Is there a way of clicking at the QGIS map and thereby entering the coordinates into the Postgis table?
I can find the coordinates on the map, copy the coordinates and enter them in the table. But that is a lot of work and it is error prone. I browsed thru all plugins, found the digitizing tools promising but this does not do what I want. I googled this specific question but didn't find a clue.
Is what I want possible at all?
I am rather a noob at gis and qgis so it took me some time before I had the right keywords to search with. And the right keyword for what I want to do apparently is "digitize". What I want is partially possible. Links that helped me are:
https://www.igismap.com/digitization-in-qgis-exploring-tools-for-digitizing/
https://www.qgistutorials.com/en/docs/digitizing_basics.html
https://gis.stackexchange.com/questions/41799/adding-shapefiles-to-postgis-database
The gist of it is:
enable the advance digitizing toolbar: view > toolbars > advanced digitizing toolbar
create a new shapefile layer: layer > create new shapefile layer. Don't forget the correct fields, in my case the name of the location. Also try to remember where you store the file (it will be a shapefile), you later need that to import the shapefile into postgis
enable the edit state of the current layer, enable the type of shape you want to import. In my case they were points
click on each location, a dialog pops up with the attributes you should add
later on you should import the shapefile, you need the third link for that together with your memory of where you stored that #$#%$& file

Drupal OpenLayers how to solve : The layer cannot be reprojected to the map projection: EPSG:

Here is my adventure. On this page I would like to display our bicycle route.
I am using in drupal 7:
Openlayers 7.x-2.0-beta3
OpenLayers KML Layer 7.x-1.0-beta1 (I'm not sure if I need this module as well)
layer: openlayers_kml_example with the source a url to a file.
map : example_kml Example KML Map
The result is that the layer is displayed very very small on the big map. So if you zoom in to the airplane eventually you can see the track.
Map Projection set to 3857
Display Map Projection set to 4326 (the KML is made with Google earth. I think not important as there is no interaction only displaying.
LAYER SPECIFIC OPTIONS FOR KM extract styles and attributes ON.
If I put tracks on then I will miss the nice airplane icon.
I keep getting the same logs and of course no display on the page:
MESSAGE The layer cannot be reprojected to the map projection: EPSG:
MESSAGE Notice: Undefined variable: map in openlayers_layer_sanity_check() (line 399
MESSAGE Notice: Undefined property: stdClass::$name in openlayers_layer_sanity_check()
As it is not nice for people to think that I'm cycling constantly in water I would like to solve it :-)
Any suggestions?
John is correct in describing the issues but here is the solution :-)
Update drupal module openlayers to the latest version, currently 7.x-2.0-beta9.
Take care of the needed dependencies.
I reset all my layers and maps to the orginial and then adjusted the source of the kml layer to a file.

Online Maps (google, nokia)

Is it possible to highlight a list of countries with a different colors?
I need to display some countries' statistics on the world map.
Now I use an image and fill a region with color (calculated for each country) by country's coordinates. It's a simple solution and it works well. But now I need to specify the countries' name too (and I think it's not the last customization).
There is a polygon solution, but it uses an array of coordinates. I don't think it's a suitable solution to highlight countries's territory.
I haven't found a solution yet. Any suggestions?
Thanks in advance.
Highlighting countries or regions to support statistics is known as Choropleth Mapping
, but unfortunately there usually isn't direct library support for Choropleth maps bundled into an online map API. This means you'll have to create your own framework, but fortunately it is possible to create one - I wrote an example using jQuery + HERE Maps to
answer the question here
Updated WKT solution now available
Access to KML shapes is no longer required, since the Geocoder API now offers an IncludeShapes attribute which returns the shape of a country in WKT format. A WKT parser can be found here.
A simple WKT choropleth example can be found here.
KML Base solution
For any framework you will need to have a file holding the boundaries of the countries or regions you need. The example uses a KML file, but you could also start with polygons if you had them. Country borders are a political minefield, which is the reason I guess most online mapping APIs steer clear of them. As a hint: try starting with something like http://geocommons.com/overlays/119819 and simplify it as much as possible to speed up the rendering- many small wiggles in the coast lines and small outlying islands are unnecessary.
Of course you could also try searching for "create choropleth map" from a search engine of your choice and use an tool to create a static image for your data (potentially at several zoom levels) and then use this as the basis of an map tile overlay. This requires a lot more work up front, but would push all the calculations server side and hence be faster to display.
Working example can be found on GitHub here
You could put the country's name into the image. It's not that difficult to place text into an image. The only tricky bit is if you are using tiles, you need to deal with names that cross tile boundaries by drawing the name once for each tile.

KML file polygon data to db/php?

I'm using gmaps v3 and I am using a kml file to display polygon shapes.
What I want to do, is that if I have a LNG/LAT coordinate, how to find whether it falls on the boundary or inside the shape?
I understand you can do this with V2 maps but not V3. So then my questions are:
Can I import the coordinates into my db in a useful way that I can then do a select statement if the LNG/LAT falls in between?
Can I do something useful on the serverside end since I have all the data to hand anyway?
Any advice appreciated.
Thanks
Solved, I found a way of converting the kml file to lat/lng coordinates which I could then apply to a php function here: derivante.com/files/phpgis.txt

dynamic map managment in google earth

My goal is to display various shapes(polygons, points, linestring) on google maps by using data entered into a Postgis database dynamically(i mean by that we can see modifications in the map in real time).
I was looking for a way to do this that used the spatial structure already provided in postgis(already designating if shape is a linestring or polygon, etc) instead of parsing out the coordinates and then re-entering spatial structure in google maps. I saw that google maps api is now compatible with kml data formats. And then I read that i have to convert postgis data to kml format.
I've done some reading in the forums about the actual process of converting postgis data to kml via FWTools, but didn't see anything that would help me. I'm new to kml but am familiar with postgis and perl and PHP. Is there a tutorial for the process of converting postgis data to kml? Where can I get started? Thanks for any help
You can use PostGIS to convert to KML directly:
SELECT ST_AsKML(geometry) from MyTable;
ST_AsKML is one of several output formats, including WKT, GML, GeoJSON, etc.
To show dynamic data in Google Earth, a common pattern is to use KML with a NetworkLink element. Have the link's viewRefreshMode equal to onStop and Google Earth will make requests (to a URL served by PHP, presumably) with bounding box parameters attached. Use the bounding box to query features in the PostGIS database, and return results as kml. This is great if you have lots and lots of features, but only want to retrieve those in the region the user is looking at.
Depending on the complexity of your application, you may also want to look at GeoDjango. (Familiarity with PostGIS is a big head start!)
You can get a textual representation of the spatial data from a Postgres DB using a text conversion function, like
SELECT AsText(MyGemoetry) from MyTable
then you parse the string, create your objects using various API functions - depending on the PostGIS geometry type - and append these object to the main GE plugin object in a DOM like way.
If you are familiar with JavaScript and have a fundamental knowledge of XML, a good start is http://code.google.com/apis/earth/documentation/reference/
Don't forget to specify unique ID's to your objects so you can find them later to drop/modify.
Maybe you can get some inspirations here, display the linked "locator.js" file and look at function PaintSubField(Coord) ... this is another way, bit crude but effective, avoiding to mess around with too many individual parent/child objects and structures
You also may want to consult sample applications and use the code playground for "rapid prototyping"
re "realtime" you need at least an event that you can link your generation/redraw routines to.
Good luck
MikeD

Resources