File talk:Usa counties large.svg

维基共享资源,媒体文件资料库
跳转到导航 跳转到搜索

Would people be ok with it if I change the code so that the current id becomes the class identifier and the current inkscape:label becomes the new id? I.e.

<path
     id="11001"
     d="m 856.36053,257.44814 0.98236,-1.599 0.91461,0.474 2.09131,1.077 -1.9148,3.006 -0.12837,-1.141 -0.47246,-0.918 -0.80408,-0.353 -0.66857,-0.546"
     inkscape:label="Washington, DC" />

becomes

<path
     class="_11001"
     d="m 856.36053,257.44814 0.98236,-1.599 0.91461,0.474 2.09131,1.077 -1.9148,3.006 -0.12837,-1.141 -0.47246,-0.918 -0.80408,-0.353 -0.66857,-0.546"
     id="Washington, DC" />

The underscore in the class name is required since they are not allowed to start with numbers. Making the above changes should make derivative maps easier to make. It retains the current data whilst removing the reliance on inkscape and sodipod elements.

I'm primarily asking in case anyone has already built any tools relying on this version. If so I'll upload it under a different filename. /Lokal_Profil 00:45, 30 January 2013 (UTC)[回复]

Actually there doesn't seem to be much activity around this map (based on usage and uploader) so I'll just go ahead. Shout if you want me to revert. /Lokal_Profil 01:04, 30 January 2013 (UTC)[回复]

Compatibility issues[编辑]

I created the version that this file is based on, but I like your approach a lot, using CSS for visual properties based on FIPS code. But I'm having problems with it:

Inkscape
Does not display any of the CSS properties I define.
rsvg-view
Does not display any of the CSS properties I define, but spits out errors:
(rsvg-view-3:14870): librsvg-WARNING **: CSS parsing error
Netscape
Displays just what I'd expect.
Chrome
Displays just what I'd expect.
IE
Dunno and don't care.
MediaWiki
Most importantly, it doesn't work on Wikipedia. I uploaded the test file to English Wikipedia, and the preview and thumbnail PNGs are all rendered uniform grey. Clicking on it to get the SVG, though, and it renders properly in Netscape or Chrome. (The file is not there any longer -- I uploaded to English WP so that I could delete the otherwise useless file when done with the test.)

I'm not an SVG expert, but it was my understanding that MediaWiki uses the same libraries as RSVG, so I'm in the habit of checking any SVG that I generate with rsvg-view. (After having upgraded my Kubuntu system I find the latest version is rsvg-view-3; I don't know if that affects its relationship to what MediaWiki employs.)

Here is what I added to the SVG file to color 3 counties for this test:

/*CSS insertion point*/

._29510 {fill:red}
._27137 {fill:green}
._29189 {fill:blue}

It makes no difference whether or not I add a semicolon after the property value.

Kbh3rd (talk) 19:19, 6 February 2013 (UTC)[回复]

My fault. I made sure the file worked with "c" preceding the fips codes and then changed this to "_" since it looks more elegant. Pretty sure I looked up whether that that was ok... anyway I must just have checked it in firefox afterwards. Have now changed the class names back to being preceded by a "c" so
/*CSS insertion point*/

.c29510 {fill:red}
.c27137 {fill:green}
.c29189 {fill:blue}
should work and give you the desired result /Lokal_Profil 22:07, 7 February 2013 (UTC)[回复]
Tried it with SVG check and it now renders fine. /Lokal_Profil 22:13, 7 February 2013 (UTC)[回复]

Missing Data[编辑]

While working in this file, I discovered that a county was missing (no ID tag). When I fixed that, I discovered that several others were missing either a class tag or a valid ID tag. Below are the errors I found:

Alaska

  • id="path6497" change to class="c02198" id="Prince of Wales-Hyder Census Area, AK"
  • id="path6542" change to class="c02275" id="Wrangell City and Borough, AK"
  • id="path6540" change to class="c02195" id="Petersburg Census Area, AK"
  • id="path6510" change to class="c02230" id="Skagway Municipality, AK"
  • id="path6581" change to class="c02105" id="Hoonah-Angoon Census Area, AK"
  • id="path6556" change to class="c02105b" id="Hoonah-Angoon Census Area, AK" (Not quite sure about these, since Alaska doesn't have proper counties)
  • id="Ketchikan Gateway, AK" add class="c02130"

Delaware

  • id="New Castle, DE" add class="c10003"

FL

  • id="Monroe, FL" == class="c12087"
  • id="path7615" == class="c12071" id="Lee, FL"
  • id="path7617" == class="c12015" id="Charlotte, FL"
  • id="Orangde, FL" == id="Orange, FL"

IN

  • id="Posey, IN" == class="c18129"
  • id="Gibson, IN" == class="c18051"

MA

  • id="Norfolk, MA" == class="c25021"

ME

  • id="Hancock, ME" == class="c23009"
  • id="Waldo, ME" == class="c23027"
  • id="Knox, ME" == class="c23013"

MD

  • id="path7707" == class="c24039" id="Somerset, MD"
  • id="Somerset, MD" == class="c24039a" (duplicate path?)

MI

  • id="Alger, MI" == class="c26003"
  • id="Mackinac, MI" == class="c26097"
  • id="Chippewa, MI" == class="c26033"
  • id="Charlevoix, MI" == class="c26029"
  • id="Leelanau, MI" == class="c26089"

NC

  • id="Currituck, NC" == class="c37053"

NY

  • id="Nassau, NY" == class="c36059"
  • id="New York, NY" == class="c36061"
  • id="Suffolk, NY" == class="c36103"

RI

  • id="Newport, RI" == class="c44005"

TN

  • id="Tipton, TN" == class="c47167"

VA

WA

  • ID="Jefferson, WA" == class="c53031"
  • ID="Whatcom, WA" == class="c53073"
  • ID="Mason, WA" == class="c53045"
  • ID="Kitsap, WA" == class="c53035"
  • ID="Pierce, WA" == class="c53053"
  • ID="Pacific, WA" == class="c53049"
  • id="San Juan, WA" == class="c53055"

WI

I've updated a spreadsheet that lets me color the svg file with the county tags added. How should I post this? — Preceding unsigned comment was added by 72.22.12.62 (talk) 14:19, 31 July 2017 (UTC)[回复]

I've made all of the changes excluding Alaska (because boundry changes make those complicated). Drmccreedy (留言) 03:43, 15 October 2018 (UTC)[回复]

Massive changes for Iowa[编辑]

@Spesh531: Your upload for Iowa updates changed most lines in this entire SVG. I'm assuming these were done by the editing software and not intentionally. Three examples:

  • The dc:title "Map of Counties in the USA" was blanked
  • Every path was changed not just the ones for Iowa counties
  • An arbitrary id was added to the thousands of title elements, inflating the file size

Ideally, I'd like to see the changes redone so that only Iowa is affected. At this point, it's impossible for me to see what the substantive changes were. Drmccreedy (留言) 20:06, 7 February 2020 (UTC)[回复]

Weird. I only edited the county boundaries in Iowa. Nothing else was touched. I used Inkscape (which I know has caused issues for many .svg in the past, though this file shows in the "SVG Development" section that it was edited in Inkscape.) Is there a free visual svg software that does bring the problems that Inkscape seems to? Spesh531(talk, contrib., ext) 22:50, 10 February 2020 (UTC)[回复]
Unfortunately I'm not very familiar with SVG editing software. That being said, a workaround could be to take the pre-Iowa map and make an inconsequential change in Inkscape to use as a starting point. Copy that and do the Iowa changes. Compare the two update files with something like WinMerge and manually make the desired changes to the pre-Iowa map with a text editor. After all, I think all you want to know is the new path data for the updated counties. Clunky but should work. Drmccreedy (留言) 18:08, 11 February 2020 (UTC)[回复]

Update required on Alaska portion[编辑]

As I don’t have the tools to do so myself, I am requesting that somebody correct the map so it is up to date. https://www.census.gov/programs-surveys/geography/technical-documentation/county-changes.html The Valdez-Cordova Census Area in the state of Alaska was abolished in January 2019, and whilst its two successors (The Chugach and Copper River Census Areas) do not have their own separate Wikipedia pages as of yet, I do believe this map should be fixed to include their presence.

If anybody chooses to take some of their spare time and complete this small change, Thanks in advance. The2016 (留言) 08:28, 1 August 2020 (UTC)[回复]

What map projection is this?[编辑]

I'm wanting to pair this map with a topographical map of North America, but to do that it would be very helpful for me to know what map projection was used to obtain this. Does anyone know?

Thanks!

Chugach and Copper River[编辑]

The census areas of Chugach and Copper River have not been added despite its existence for 2 years. AridCeption (留言) 05:42, 20 August 2021 (UTC)[回复]