Code Monkey home page Code Monkey logo

geos's Introduction

Google Earth Overlay Server (GEOS)

Warning: This project is not maintained anymore. Feel free to fork or re-use the code for whatever you like as permitted by the BSD-3-clause license. Personally, I moved on to QGIS for managing my maps and GPS tracks.

If you are looking for a direct replacement for geos, consider using kmlsuperoverlay by @nono303, which is a PHP reimplementation of geos and actively maintained.

readthedocs

This is a python-based server for creating Google Earth overlays of tiled maps. Your can now also display maps in the web browser, measure distances and print maps as high-quality PDF's.

geos google earth

Developers can also use GEOS as a library to convert coordinates or to access the map printing functionality programmatically.

Use GEOS on the web without installation on geos.gsturm.eu. Note that for legal reasons, the public version comes with a very limited set of maps. You still can install and use GEOS locally with full flexibility!

Documentation is available at https://geos.readthedocs.io/en/latest/

Aspirations

Can GEOS become a unified interface for converting, displaying and using web maps? Like a web-based version of the seemingly old-fashioned MOBAC?

Imagine you can draw and measure on a map like in Swisstopo, download paper maps as simple as with nkart.no and create an offline map for your GPS device just as with MOBAC for any map out there simply in your web browser.

Contributing

If that sounds as awesome to you as it does to me, feel free to fork and create pull requests or simply drop me a message.

Alternatives

  • If you want to setup geos on a server, you might as well consider MapProxy, which is much more professional but a bit more challenging to configure.
  • If you are looking for a software to explore and print maps locally, consider using QGIS.

geos's People

Contributors

cauldnz avatar dependabot[bot] avatar grst avatar hghwng avatar kiwibrew avatar nono303 avatar p-ho avatar tostt avatar zstadler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geos's Issues

customMapSource <region> return bad BBOX area

Hi,
I'm trying to limit tiles for a country (France) using <region> as documented here https://geos.readthedocs.io/en/latest/users.html#creating-mapsources
Here is my mapsource

<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
	<name><![CDATA[FR - IGN SCAN25]]></name>
	<minZoom>6</minZoom>
	<maxZoom>16</maxZoom>
	<tileType>jpg</tileType>
	<url><![CDATA[https://wxs.ign.fr/an7nvfzojv5wa96dsga5nk8w/geoportail/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN25TOUR.CV&STYLE=normal&FORMAT=image/jpeg&TILEMATRIXSET=PM&TILEMATRIX={$z}&TILEROW={$y}&TILECOL={$x}.jpg]]></url>
	<tileUpdate>IfModifiedSince</tileUpdate>
	<backgroundColor>#00000000</backgroundColor>
	<ignoreErrors>true</ignoreErrors>
	<region>
        <north>51.2</north>
        <south>41.2</south>
        <east>9</east>
        <west>-5.2</west>
   </region>
</customMapSource>

the result is a GoogleEarth area corresponding to:

        <north>55.75</north>
        <south>41</south>
        <east>0</east>
        <west>-22,5</west>

Clipboard01

Either i didn't understood the purpose of <region>, the unit (actually in WGS84 lat/lon ) or there is a bug

my 2 cents:

  • Mapsource.py l.220
            bbox = GeographicBB(min_lon=bounds["west"], max_lon=bounds["east"],
                                min_lat=bounds["south"], max_lat=bounds["north"])
  • Geometry.py, class GeographicBB l.144
def __init__(self, min_lon=None, min_lat=None, max_lon=None, max_lat=None):

parameters seems not being in the right order

Add markdown table support for Read the Docs

By default, Read the Doc's Sphinx engine does not support Markdown tables.

As a result, here we see

image

rather than

image

github.com/ryanfox/sphinx-markdown-tables provides an extension that adds the required support. According to its docs, the solution is to add sphinx_markdown_tables to extensions in conf.py, like so:

extensions = [
    'sphinx_markdown_tables',
]

Note:
According to this issue, you may also need to add sphinx_markdown_tables to ReadtheDocs' requirements.txt file.

Confusing licensing statements

Hi Gregor,

I noticed that the LICENSE file is BSD-3-Clause for geos, but the setup.py and other Python metadata states it is GPL-3.0.

Could you help me understanding which is the correct licensing?

Switch to React

New design:

  • collapsable sidebar with selectable layers (create overlays on-the-fly).
  • Reorder layers by drag&drop
  • panel in sidebar for gpx tracks.

Correct CORS configuration

Hi,

According to https://help.openstreetmap.org/questions/38308/osm-tile-server-how-to-enable-cors, crossOrigin for OL must be null and not 'anonymous' to avoid CORS blocking.

Here is the working patch:

diff --git "a/geos/static/custom.js" "b/geos/static/custom.js"
index ab2b30e..85de081 100644
--- "a/geos/static/custom.js"
+++ "b/geos/static/custom.js"
@@ -307,14 +307,15 @@ function activateMap(mapSource) {
     currentMap = mapSource;
     $('#maps li.active').removeClass('active');
     $('#' + mapSource.id).addClass('active');
-    console.log(mapSource.name);
+    console.log('loading: '+mapSource.name);
     layers = map.getLayers();
     layers.clear();
     $.each(mapSource.layers, function (i, tileLayer) {
         tmpLayer = new ol.layer.Tile({
             source: new ol.source.XYZ({
                 url: tileLayer.tile_url,
-                crossOrigin: 'anonymous',
+				// https://help.openstreetmap.org/questions/38308/osm-tile-server-how-to-enable-cors
+                crossOrigin: null,
                 minZoom: tileLayer.min_zoom,
                 maxZoom: tileLayer.max_zoom
             })

Test

Please ignore

The KML is generated using machine name not public name

Hi there, are you able to add a new command line argument to enter the publicly available name of the server? The KML that is generated references the machine name, which my desktop client cannot see. If I manually edit the network links and change the server name then it is all good.

Thanks,
Marc

add cesium + openlayers

Google Earth is pretty old school... we could actually view 3d imagery with tile overlays directly in the browser.

Cannot pip install cartopy

Attempting to install Cartopy-0.17.0 after pip installing geos. Receive the following error:

UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail.

Is there a version 3.3.3 available for pip install? Can you provide assistance in getting the installation completed?

Encoding error

non utf-8 code starting with \x90 in file ...geos.exe.

(on windows)

Support polygon bounding boxes in mapsources.

For example in the outdooractive germany map we end up having white tiles, as Outdooractive doesn't provide tiles outside Germany. By now, we can only define the bounding box as a rectangle which is not precise enough to capture the boundaries of the map.

Use something like counterclockwise points in the xml:

<region>
    <point><lat>...</lat><lon>...</lon></point>
    <point>...</point>
    ...
</region>

PIL/Pillow module error

Traceback (most recent call last):
  File "/Users/<user>/Library/Python/3.7/bin/geos", line 6, in <module>
    from geos.scripts.runserver import run_app
  File "/Users/<user>/Library/Python/3.7/lib/python/site-packages/geos/__init__.py", line 4, in <module>
    import geos.server
  File "/Users/<user>/Library/Python/3.7/lib/python/site-packages/geos/server.py", line 3, in <module>
    from geos.print import print_map
  File "/Users/<user>/Library/Python/3.7/lib/python/site-packages/geos/print.py", line 8, in <module>
    from PIL import Image, ImageDraw
ModuleNotFoundError: No module named 'PIL'

Although it might have been be included with Anaconda, with normal Python 3.7 installation, there is an additional step to install PIL or pillow module for geos to work on Mac OS. You might add that to the installation docs...
pip3 install pillow works nicely.

Support "<invertYCoordinate>" tag in MapSources for TMS layers

Geos doesn't seem to support the "true" tag in the map sources xml file. Is this the case?

This is the conversion (possibly the opposite of what you would need):

def GoogleTile(self, tx, ty, zoom):
    "Converts TMS tile coordinates to Google Tile coordinates"
    
    # coordinate origin is moved from bottom-left to top-left corner of the extent
    return tx, (2**zoom - 1) - ty

Taken from here: http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/

Improve LevelOfDetail (lod) for tile rendering, especially for png alpha

Hi,
As I had some trouble rendering correctly png alpha (strava, mapbuilder topo overlay, OSM gps, etc.) with geos, I had a look on how it worked for caltopo superoverlay
I just made few changes on kml.py (see https://github.com/nono303/geos/commit/212a2e12f73a899f1034d6c3d31acdd5b52afe7f) and it's works great for me!
mapbuilder topo overlay strava
As I'm not a python developer and my fix is surely dirty, i prefer not make a PR and let U see how to do it cleanly ;)

Also, is my issue https://github.com/grst/mapsources/issues/3 related to geos or mapsources?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.