GithubHelp home page GithubHelp logo

mapshader's People

Contributors

brendancol avatar giancastro avatar ianthomas23 avatar iurypiva avatar jam-lock avatar nkamrath avatar thuydotm 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  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapshader's Issues

Add CLI

  • prepare raster
  • test
  • generate_config from current working directory (find data

Create Design mockups for Mapshader

mockups needed:

  • server index page shows list of available services, their names, descriptions and links service pages
  • service page: shows details of service with interactive map displaying the layer
  • service page: shows code snippet for using in Leaflet
  • needs to be very simple HTML which will be renderered dynamically
  • convert mockups to html templates
  • add to mapshader/templates directory

Add Geoprocessing Service

  • Setup PR to track progress
  • Add integration test with test graph
  • implement graph service
  • make graph service enabled by default when server starts
  • add documentation
  • add example notebook
  • add xarray-spatial proximity as valid graph operation
  • add xarray-spatial reclassify as valid graph operation
  • [ ]

Add AreaService Type

  • takes geojson as input and returns area calculations for each feature
  • takes epsg code for reprojection before area calculation
  • add ability to define service in config
  • should allow for list of valid epsg codes

Add WGS84 tile support

class GlobalGeodetic(object):
	"""
	TMS Global Geodetic Profile
	---------------------------
	Functions necessary for generation of global tiles in Plate Carre projection,
	EPSG:4326, "unprojected profile".
	Such tiles are compatible with Google Earth (as any other EPSG:4326 rasters)
	and you can overlay the tiles on top of OpenLayers base map.
	
	Pixel and tile coordinates are in TMS notation (origin [0,0] in bottom-left).
	What coordinate conversions do we need for TMS Global Geodetic tiles?
	  Global Geodetic tiles are using geodetic coordinates (latitude,longitude)
	  directly as planar coordinates XY (it is also called Unprojected or Plate
	  Carre). We need only scaling to pixel pyramid and cutting to tiles.
	  Pyramid has on top level two tiles, so it is not square but rectangle.
	  Area [-180,-90,180,90] is scaled to 512x256 pixels.
	  TMS has coordinate origin (for pixels and tiles) in bottom-left corner.
	  Rasters are in EPSG:4326 and therefore are compatible with Google Earth.
	     LatLon      <->      Pixels      <->     Tiles     
	 WGS84 coordinates   Pixels in pyramid  Tiles in pyramid
	     lat/lon         XY pixels Z zoom      XYZ from TMS 
	    EPSG:4326                                           
	     .----.                ----                         
	    /      \     <->    /--------/    <->      TMS      
	    \      /         /--------------/                   
	     -----        /--------------------/                
	   WMS, KML    Web Clients, Google Earth  TileMapService
	"""

	def __init__(self, tileSize = 256):
		self.tileSize = tileSize

	def LatLonToPixels(self, lat, lon, zoom):
		"Converts lat/lon to pixel coordinates in given zoom of the EPSG:4326 pyramid"

		res = 180 / 256.0 / 2**zoom
		px = (180 + lat) / res
		py = (90 + lon) / res
		return px, py

	def PixelsToTile(self, px, py):
		"Returns coordinates of the tile covering region in pixel coordinates"

		tx = int( math.ceil( px / float(self.tileSize) ) - 1 )
		ty = int( math.ceil( py / float(self.tileSize) ) - 1 )
		return tx, ty

	def Resolution(self, zoom ):
		"Resolution (arc/pixel) for given zoom level (measured at Equator)"
		
		return 180 / 256.0 / 2**zoom
		#return 180 / float( 1 << (8+zoom) )

	def TileBounds(tx, ty, zoom):
		"Returns bounds of the given tile"
		res = 180 / 256.0 / 2**zoom
		return (
			tx*256*res - 180,
			ty*256*res - 90,
			(tx+1)*256*res - 180,
			(ty+1)*256*res - 90
		)

(from: https://github.com/brendancol/RacialDotMap/blob/master/globalmaptiles.py)

Fix test suite

=========================== short test summary info ============================
FAILED mapshader/tests/test_core.py::test_default_to_image[elevation_source]
FAILED mapshader/tests/test_core.py::test_default_to_tile[elevation_source]
FAILED mapshader/tests/test_core.py::test_to_raster[elevation_source]
FAILED mapshader/tests/test_core.py::test_tile_render_edge_effects
============ 4 failed, 29 passed, 4 skipped, 38 warnings in 37.98s =============

numba-ize mercator.py

  • add tests for mercator.py (using pytest mapshader/tests/test_mercator.py -sv -k <optional_grep>
  • benchmark performance of current functions (using pytest-benchmark)
  • add numba decorators and see what performance improvements we can achieve

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.