Git Product home page Git Product logo

Comments (6)

Nakaner avatar Nakaner commented on May 18, 2024

Hi Sandoval,

just to be sure that you did not tap into one of the common pitfalls:

  • Which osm2pgsql style did you use? Just link or post it her.
  • Which command did you use to import (one of the options --latlon or --merc)?
  • Which osm2pgsql version did you use?
  • Is your database hstore-enabled?
  • What's the projection of your database (EPSG:4326, EPSG:3859 or EPSG:900913)? #122

Best regards

Michael

from node-tileserver.

SandovalDanilo avatar SandovalDanilo commented on May 18, 2024

Hey Michael,

  • The command I used was osm2pgsql --create --username avm --database avm-node --slim --cache 512 berlin-latest.osm.pbf, and as it was not defined, the style used was the default and --merc was used.
  • Osm2pgsql version 0.91.0-dev, compiled from the source.
  • Yes, hstore is enabled.
  • I'm not sure about the projection, since I didn't see any option about this during the import. As I said, I cloned osm2pgsql from github and compiled it from there. So I assume the default option was used.

Thanks

from node-tileserver.

Nakaner avatar Nakaner commented on May 18, 2024

The command I used was osm2pgsql --create --username avm --database avm-node --slim --cache 512 berlin-latest.osm.pbf, and as it was not defined, the style used was the default and --merc was used.

--merc imports the data as EPSG:3857 which has the same parameters as EPSG:900913 but node-tileserver is such outdated th

Yes, hstore is enabled.

You have enabled hstore at your database but you did not use it for the import in the correct way. You still have lots of tag columns and one hstore column for tags which do not fit anywhere. node-tileserver expects all tags to be in one single hstore column. You should use your own style sheet which could look like this.

from node-tileserver.

SandovalDanilo avatar SandovalDanilo commented on May 18, 2024

--merc imports the data as EPSG:3857 which has the same parameters as EPSG:900913 but node-tileserver is such outdated th

Is this message complete? I think that for some reason the text was cut.

You have enabled hstore at your database but you did not use it for the import in the correct way. You still have lots of tag columns and one hstore column for tags which do not fit anywhere. node-tileserver expects all tags to be in one single hstore column. You should use your own style sheet which could look like this.

Ah, I see. So I should be able to configure, using this example, a style to use not only railways but also streets and buildings, right?

from node-tileserver.

rurseekatze avatar rurseekatze commented on May 18, 2024

EPSG:900913 is completely replaced by EPSG:3857. See #122 for further details. Now everything should work properly in your case.

node-tileserver expects all tags in hstore column, so you should configure osm2pgsql so that every tag is at least in the hstore column.

For example, OpenRailwayMap (which uses node-tileserver for rendering) currently runs osm2pgsql with the options --hstore-all and --hstore-match-only and this stylefile to import only objects with railway=* tag and store all tags just in hstore column without creating any separate tag column.

from node-tileserver.

michaill avatar michaill commented on May 18, 2024

I faced the same problems. Problem was in projection, but nothing from hints here was helpful. I solved my problems by using -E 3857 flag in osm2pgsql when importing the pbf data.

from node-tileserver.

Related Issues (20)

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.