Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiled output. And a bugfix. #65

Closed
wants to merge 5 commits into from
Closed

Tiled output. And a bugfix. #65

wants to merge 5 commits into from

Conversation

wziard
Copy link

@wziard wziard commented Nov 14, 2018

Hi, I didn't await your reaction to my issue #62 and implemented it anyway. It is quite a big commit so you'll probably have some reservations about applying it. However, the speedup in my tile generation is a factor 100, so I still created the pull request. I'm currently very busy at work so it's a bit of a 'take it or leave it' situation as I don't have the time to do extensive reworking of the patch, sorry.

The other commit is a workaround for when the player label (--drawplayers) or the origin circle (--draworigin) crosses the image boundary, which can happen if you specify --geometry. It really should be two separate pull requests, but I have no idea how to get github to do that from a single branch.

Martijn Versteegh added 4 commits November 14, 2018 12:57
The produces tiled output way faster than repeatedly using --geometry
because it only reads the databse once.
@wziard
Copy link
Author

wziard commented Nov 15, 2018

Hm, apparently the libgd Travis uses is older? I'll look into it.

@wziard wziard closed this Nov 15, 2018
@sfan5
Copy link
Member

sfan5 commented Nov 15, 2018

IMO generating tiling pyramids is better left to an external utility in your programming language of choice.
(which is Python, if you were to ask me)

@wziard
Copy link
Author

wziard commented Nov 15, 2018

That's what I did first. But it is much easier from within minetestmapper because there I already have the needed info available:

  • how many tiles there are in each direction.
  • which tiles are actually available.
  • To generate leaflet compatible tiles I need to save them with the correct zoomlevel in the filename. I could of course rename the tiles afterwards with some other program, but this was easier.

I agree that it's not very hard to autodetect everything from the filenames and rename stuff, but still it was a lot easier from within minetestmapper.

My pull request was created only for the --tiled option though. I didn't know github auto-updated pull requests to always point tot the tip of a branch. I can put the --tiled option on a separate branch if you'd like.

@wziard
Copy link
Author

wziard commented Nov 15, 2018

But even that code needs some polishing first :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants