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

import: few countries are missing borders #7

Open
rinigus opened this issue Jul 19, 2017 · 13 comments
Open

import: few countries are missing borders #7

rinigus opened this issue Jul 19, 2017 · 13 comments

Comments

@rinigus
Copy link
Owner

rinigus commented Jul 19, 2017

Countries like Latvia, Guatemala are missing borders on import. This leads to impression of deformed countries, as in rinigus/osmscout-server#166

@am2222
Copy link

am2222 commented Sep 29, 2017

I have seen this problem in Iran's too, Is not it because of converting from pbf to sqlite? as you know we have some warnings during this process.

@rinigus
Copy link
Owner Author

rinigus commented Sep 29, 2017

It is probably related to conversion from PBF to SQLite. I think something is broken in the process, but I will not have any time to look into it in foreseeable future.

@am2222
Copy link

am2222 commented Sep 29, 2017

I'll take a loot at that, Also I think there must be some other shapes like "ne_110m_admin_0_boundary_lines_land",builtup_area,ne_10m_populated_places,ne_110m_admin_0_boundary_lines_land,places,processed_p,shoreline_300,world_boundaries_m which I have seen the version of OSM2psql which might cause this problem too,
Anyway I am confused about making styles.xml files, Does we can make them automatically based on our data?our you have build them manually?As I just used your preapared mapnik.xml file and just replaced database names.

@rinigus
Copy link
Owner Author

rinigus commented Sep 29, 2017

style.xml is made using carto tool - manually I was writing carto input files.

@am2222
Copy link

am2222 commented Sep 29, 2017

@rinigus It seems the layers which I have said includes some countries borders, I have to edit carto input files to add those shapes. Can you please give me some clues which files should I edit to find out if it is correct or not?
thanks

@rinigus
Copy link
Owner Author

rinigus commented Sep 29, 2017

If its coming from PBF, you would have to look into https://github.com/rinigus/mapnik-styles-sqlite/blob/master/importer/import_pbf.sh and corresponding config file in the same dir. If its separate shapefiles, see configuration.py in the top dir and how the other shapefiles are defined (bottom of that file) and processed in style mml file, such as https://github.com/rinigus/mapnik-styles-sqlite/blob/master/styles/osm-bright/spatialite.mml

@rinigus
Copy link
Owner Author

rinigus commented Sep 29, 2017

You may find it helpful to read https://github.com/mapbox/osm-bright style documentation and how cartocss works in general. Then it will be easier to work with this style as well

@am2222
Copy link

am2222 commented Sep 29, 2017

@rinigus thanks very much for your help, I'll let you know the results. thanks

@am2222
Copy link

am2222 commented Sep 30, 2017

well I tried to add those shape files and they are added but does not show borders At all, could it be because of z order?

@am2222
Copy link

am2222 commented Oct 1, 2017

well I think this problem could be fixed by adding this lines, (it will add new world boundries shape file)

`
<Style name="world-1">
  <Rule>
   <MaxScaleDenominator>250000000000</MaxScaleDenominator>
    <MinScaleDenominator>6000000</MinScaleDenominator>
    <!-- <PolygonSymbolizer fill="#00f2efe9"> -->
    <!-- </PolygonSymbolizer> -->
    <LineSymbolizer stroke="#b5d0d0" stroke-width="0.5">
    </LineSymbolizer>
  </Rule>
</Style>
<!-- <Style name="world-2">
  <Rule>
   <MaxScaleDenominator>6000000</MaxScaleDenominator>
    <MinScaleDenominator>600000</MinScaleDenominator> 
    <PolygonSymbolizer fill="#00f2efe9">
    </PolygonSymbolizer>
  </Rule>
</Style> -->

<Layer name="world-1" status="on" srs="+proj=merc +lon_0=0 +lat_ts=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs">
<StyleName>world-1</StyleName>
<Datasource>
  <Parameter name="type">shape</Parameter>
  <Parameter name="file">global/world_boundaries_m.shp</Parameter>
</Datasource>
</Layer >`

@rinigus
Copy link
Owner Author

rinigus commented Oct 1, 2017

I presume that these XML lines will fix the issue, seems logical. But, if you want to use normal style generation flow of this project, you would have to integrate it into CartoCSS way. However, I am not going to merge it unless this extra data file is small. I am using these styles on mobile and have to deliver the data files to the users for storing on devices.

As mentioned earlier, I don't have time to work on it now and will prefer not to alter the style and import scripts at this stage that will be required is new datasource is introduced. Please feel free to fork and develop in your own branch :)

@am2222
Copy link

am2222 commented Oct 1, 2017

@rinigus thanks. But the interesting part is that for some countries (based on the first post) the borders have not any problem. Based on my search in current version of osm xml for osm2psql this extra layer does not exist anymore, I have no idea if borders are converted from pbf to sqlite or not, I also have no clue about possible tags for boarders to query database and check it.
Anyway thanks for your help, I hope these information heps others. If I could edit them I'll share its link here.

@rinigus
Copy link
Owner Author

rinigus commented Dec 15, 2017

could use the same approach as for mapbox gl

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

No branches or pull requests

2 participants