nvkelso / natural-earth-vector

A global, public domain map dataset available at three scales and featuring tightly integrated vector and raster data.
https://www.naturalearthdata.com/
Other
1.76k stars 368 forks source link

Crimea location bug #489

Closed gerasimvol closed 3 years ago

gerasimvol commented 3 years ago

Crimea somehow isn’t part of Ukraine. Please fix it. And we don’t accept any special settings or admin-0 options. It’s not a discussion, it’s a fact.

matkoniecz commented 3 years ago

Sadly, Crimea was successfully invaded and taken over by Russia.

See https://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-0-details/

Disclaimer

Natural Earth Vector draws boundaries of sovereign states according to defacto status. We show who actually controls the situation on the ground. For instance, we show China and Taiwan as two separate states. But we show Palestine as part of Israel. Please feel free to mashup our countries and disputed areas themes to match your particular political outlook.

EDIT: To be clear I consider Russian government to be evil, one of the wort on the planet and their leadership as evil and corrupt. I would prefer to live i world where invasion on Crimea never happened, also because it makes more likely that Russia will invade Poland withing next 10 or 50 or 100 years.

But sometimes you need map that shows de facto control on the ground, in such case pretending that Russia is not controlling Crimea is not helpful.

If you need map of borders as it should be according to some viewpoint you need to wait for https://github.com/nvkelso/natural-earth-vector/milestone/5 or find alternative source or help with implementing https://github.com/nvkelso/natural-earth-vector/milestone/5

naturalearthdata has de facto borders, showing actual control on the ground.

matkoniecz commented 3 years ago

See also #401 #391 #390

See also https://github.com/nvkelso/natural-earth-vector/milestone/5

gerasimvol commented 3 years ago

See also? https://undocs.org/en/A/RES/68/262 If it was taken illegally and not recognised by any civilised country, how it could be displayed on map as Russia?

mmatviyiv commented 3 years ago

@matkoniecz being agreed with "de facto borders" means accepting such invasions. The smallest thing which the civilised world can do is to keep claiming everywhere that Crimea is Ukraine. United Nations have already done that, a link is above.

nvkelso commented 3 years ago

There are a large number of people following each of the issues. Once my PR is merged the issues will be resolved, and everyone will receive a GH notification for each of the GH issues.

On Mar 7, 2021, at 14:17, Mark notifications@github.com wrote:

 @matkoniecz being agreed with "de facto borders" means accepting such invasions. The smallest thing which the civilised world can do is to keep claiming everywhere that Crimea is Ukraine. United Nations have already done that, a link is above.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

anxolerd commented 3 years ago

being agreed with "de facto borders" means accepting such invasions.

I would say it is not just "accepting" such invasions, but rather supporting them. Next times invaders may consider this "acceptance" as a sign of support.

sarnakov commented 3 years ago

I`ve figured out how to fix it.

I deleted in Russia's arcs an array [517, 518], and then changed Ukraine's arcs to "arcs": [ [ -96, -513, 575, -518, 576, -510, -428, -509, -327, -555, -497 ], [517, 518] ]

nvkelso commented 3 years ago

The referenced PR https://github.com/nvkelso/natural-earth-vector/pull/446 has been merged – though v5 remains in development so now the files in main / master branch of GH are accurate but haven't been posted to the naturalearthdata.com website yet.

rredfearn32 commented 2 years ago

I`ve figured out how to fix it.

I deleted in Russia's arcs an array [517, 518], and then changed Ukraine's arcs to "arcs": [ [ -96, -513, 575, -518, 576, -510, -428, -509, -327, -555, -497 ], [517, 518] ]

This totally worked for me. I'm using the react-simple-maps plugin, which depends on the natural-earth data. I wrote this function (very messy, I know, I will clean it up later) for updating Ukraine and Russia:

const geoData = await fetch('https://raw.githubusercontent.com/zcreativelabs/react-simple-maps/master/topojson-maps/world-110m.json')
    .then((res) => res.json())

  const geometries = geoData?.objects?.ne_110m_admin_0_countries?.geometries;
  if (geometries) {
    // Remove Crimea from Russia
    const russiaData = geometries.find(
      (i: any) => i.properties.NAME === 'Russia',
    );
    if (russiaData) {
      russiaData.arcs = russiaData.arcs.filter(
        (i: any) => JSON.stringify(i) !== '[[517,518]]',
      );
    }

    // Add Crimea to Ukraine
    const ukraineData = geometries.find(
      (i: any) => i.properties.NAME === 'Ukraine',
    );
    if (ukraineData) {
      ukraineData.type = 'MultiPolygon';
      ukraineData.arcs = [
        [[-96, -513, 575, -518, 576, -510, -428, -509, -327, -555, -497]],
        [[517, 518]],
      ];
    }
  }
mmatviyiv commented 2 years ago

How many Ukrainian victims do you need in this war to stop even assuming that Crimea can be shown as non-ukrainian land?

anxolerd commented 2 years ago

Hello @nvkelso .

I am writing to inform you that the blood of Ukrainian people, including children is on your hands as well, cause it were you, who justified the crimes of russia by recognizing occupied territories as theirs. You may be proud of yourself now!

AP22068826099381

qis commented 2 years ago

@anxolerd This has been debunked as a Ukrainian false flag operation.

webknjaz commented 2 years ago

@anxolerd This has been debunked as a Ukrainian false flag operation.

@qis Wait a second, why are you supporting the russian nazis? Did they pay you or are you revealing your ideology just now?

qis commented 2 years ago

@webknjaz I'm simply stating facts. Why are there politics on this issue in the first place?

mmatviyiv commented 2 years ago

If you wonder why do these russians keep calling war - "politics", because death, tortures, genocide for them are just common state politics.

webknjaz commented 2 years ago

@webknjaz I'm simply stating facts. Why are there politics on this issue in the first place?

It's not "politics". Also, it's not a fact but an amplification of the mordor propaganda. The only ones who spread it are paid bots and russian fascist fanatics. By amplifying this propaganda, anyone doing this is putting themself in line with the rest of the child rapist russian nazis that invaded my home. By doing this, you not not only passively but actively support this genocide along with the rest of the murders this regime praises. I see you. I see what you are. Everybody here does too.

Back to the cartography side of the question. Putting the murderous oppressor-demanded borders on a publicly available map helps the propaganda of their regime to come up with excuses for committing more genocide (that's been going on for 8 years, let me remind you, just less severe). And by extension, anyone's hands involved in this less obvious aggressor support are as dirty with the blood of the Ukrainian civilians, young and old, children and women as well as the defenders' blood too.

This is a fact. As simple as it gets. Not politics, just life. A direct result of what people decide here.

goliney commented 2 years ago

@nvkelso do you sleep well at night?

EddyCMWF commented 1 year ago

Here is some python code for moving the Crimea feature from the Russia multipolygon into the Ukraine multipolygon. Hopefully it is generic enough to use with other shapefiles.

import geopandas as gpd
from shapely import Point, MultiPolygon

crimea = {'lat': 45, 'lon': 34}
crimea_point = Point(crimea['lon'], crimea['lat'])

infiles = ['ne_110m_admin_0_map_units.zip']

for infile in infiles:
    outfile = f"{infile.replace('.zip', '')}_crimea"
    country_units = gpd.read_file(infile)

    # Get indexes for Ukraine and Russia (needed for updating the DF at end)
    irussia = country_units.index[country_units.ADMIN=='Russia']
    iukraine = country_units.index[country_units.ADMIN=='Ukraine']

    # Get Ukraine row and list with singular Ukraine Polygon:
    ukraine = country_units.iloc[iukraine]
    ukraine_polys = [poly for poly in ukraine['geometry']]

    # Get the russia row
    russia = country_units.iloc[irussia]

    # extract the Russia polygons to a list and append the polygon which contains 
    # The crimea_point to the Ukraine list
    russia_polys = []
    for i, multipoly in enumerate(russia['geometry']):
        for j, poly in enumerate(multipoly.geoms):
            if poly.contains(crimea_point):
                ukraine_polys.append(poly)
            else:
                russia_polys.append(poly)

    # Create new Multipolygons with these lists
    ukraine_multi_poly = MultiPolygon(ukraine_polys)
    russia_multi_poly = MultiPolygon(russia_polys)

    # Replace in the GPD-DF:
    country_units.loc[iukraine, 'geometry'] = ukraine_multi_poly
    country_units.loc[irussia, 'geometry'] = russia_multi_poly

    # Save to output folder
    country_units.to_file(outfile)