Coder Social home page Coder Social logo

modestmaps-py's People

Contributors

migurski avatar mojodna avatar psylum avatar thisisaaronland 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modestmaps-py's Issues

Math domain error

Key to look up in m2i for zoom/extent: watercolor_h8vqbF00cW0

Traceback (most recent call last):
  File "queue_popper_multi.py", line 71, in main
    ms.process_map(db_item,msg)
    map = self.create_map(db_item,provider,mime_type,dim)
    roughZoom = ModestMaps.mapByExtent(provider, se, nw, dim)
Processing... watercolor_h8vqbF00cW0
  File "/app/mapsettings.py", line 232, in create_map
  File "/app/ModestMaps/__init__.py", line 119, in mapByExtent
    mapCoord, mapOffset = calculateMapExtent(provider, dimensions.x, dimensions.y, locationA, locationB)
  File "/app/mapsettings.py", line 273, in process_map
  File "/app/ModestMaps/__init__.py", line 179, in calculateMapExtent
    hZoomDiff = math.log(hFactor) / math.log(2)
None
ValueError: math domain error

Understanding Transformation parameters

In Geo.py Transformation.untransform, on the input, it is expected (at least how ModestMaps is used by TileStache), that the input point coordinates are representing row and column of requested tile.

According to http://blog.kartena.se/local-projections-in-a-world-of-spherical-mercator/, cx and cy parameters are supposed to be Origin of the tile set, which is given in map units (meters in my case).

Therefore, the transform/untransform function can not work well, if cx and cy parameters are given in map units, because it's calculating with input rows/columns.

Either the code is wrong, or it's usage in TileStache or my understanding of Transformation (based on the blog mentioned earlier)

class Transformation:
...
    # point uses coordinates representing columns/rows of given tile
    # cx and cy are given in map units (meters) of the tile set origin - or maybe not?
    def untransform(self, point):
        return Point((point.x*self.by - point.y*self.bx - self.cx*self.by + self.cy*self.bx) / (self.ax*self.by - self.ay*self.bx),
                 (point.x*self.ay - point.y*self.ax - self.cx*self.ay + self.cy*self.ax) / (self.bx*self.ay - self.by*self.ax))

Update to Python 3

Is there any interest in porting to Python3?

I have some scripts I'd like to use in Python 3, and I'd like to port ModestMaps to Python3. But I'd like to merge upstream, I don't see a reason to create two separate forks.

Thanks!

Zoom-related retries should be capped

If a request fails, MM will retry to the request at a lower zoom. However, if the lower zoom fails, it will continue to do so well into negative values for zooms.

LICENSE text

Full license text statement is missing in this project. BSD license is mentioned
only in the setup.py file. This is challenging because there are many different
specific licenses in the BSD family.

Could you please commit a particular BSD license text?

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.