Home About Chat Users Issues Party Candidates Polling Firms Media News Polls Calendar Key Races United States President Senate House Governors International

New User Account
"A comprehensive, collaborative elections resource." 
Email: Password:

  How do I create maps?
FAQ DETAILS
Parent About Website
Answer If you have sufficient access, at the bottom of the Container Edit page you should have a link "Add New Map Location". There may already be existing Map Locations for prior dates as boundaries can change over time.

Map Locations are assembled together to form Map Images. For example, the 50 US State Map Locations combine to form the Map Image of the United States. A Map Location can be attached to multiple Map Images to it does not have to be re-entered. For example, US states in the eastern part whose boundaries hadn't changed are reused in later Map Images where the states and territories in the west were changing.

Map Locations on the site are in vector format. What this means is that there is a list of latitude/longitude coordinates that have a line drawn through them and then filled in like a connect the dots picture. In the Map Location Edit page, these are entered into the Longitude/Latitude Polygon Coords entry box as Longitude, followed by a space, Longitude, followed be a return, and then repeated until the full shape is made. The end coordinate will be automatically attached to the first coordinate and the shape filled.

Map Locations may contain multiple shapes which are done by entering two returns between the shapes' lists of coordinates. They may also contain "cut out" shapes inside of other shapes that remove parts of the shape as holes and these are represented the same as an additional shape with double returns, but the entire shape block starts with a X character at the beginning of the first coordinate.

Vector images may be found in many areas such as the US Census Bureau [Link] , GADM [Link] , government state or municipality websites or elsewhere scattered around the web - these are often labeled as GIS - Graphic Information Systems. You may also create your own maps by using Map Editor software. There are a number of different file formats for these vector images, with two of the most common being Shapefiles (.shp) and Google Keyhole Markup Language (.kml/.kmz). The recommended format to use to transfer these maps into OurCampaigns is KML, as it is the most similar and easiest. Online converters are available to convert other formats to KML - [Link] . A .kmz file is just a zipped .kml file and can be converted to a .kml file by running an unzip program on it.

One you have a .kml file, you can open it up in any text editor and it should be somewhat readable. It is a variant of an .xml format which was designed to be human readable. You may see areas surrounded by <Placemark>..other items..</Placemark> and these generally will correspond to a OC MapLocation. There will likely be something in there that describes the name of the MapLocation or perhaps the District number. There will also generally be a <Polygon>...</Polygon> or <MultiPolygon>...</MultiPolygon> section that contains your latitude and longitude coordinates. There are generally two types: <outerBoundaryIs><LinearRing><coordinates>.../<coordinates></LinearRing></outerBoundaryIs> which correspond to the standard shape image and <innerBoundaryIs><LinearRing><coordinates>.../<coordinates></LinearRing></innerBoundaryIs> which correspond to the "cut-out" holes mentioned earlier. You may easily have a file that has no cut-outs. Most often, these coordinates are in the format of Longitude,Latitude[space]..etc and will need to be converted to Longitude[space]Latitude[return]. Your text editor should have a search and replace function that can do this.

One you have added these coordinates to your Longitude/Latitude Polygon Coords entry area on your Add New MapLocation screen, you'll want to make sure you set the Active and Inactive dates so they don't overlap any others in the Container you're in. If there are no others, and you don't know when the boundaries have changed or will change, you can leave them unset.

Sometimes, the source vector file can have massively detailed data which is too large for the website. Once your MapLocation is saved it will tell you the number of bytes it takes up next to the visual display. Sizing them correctly can be more of an art than a science, but a general rule of thumb is to get them around 10,000 bytes. If the quality of the image is degrading too much you can let them get bigger, but try and keep them as small as you can while keeping them of decent quality. The way to reduce the size is using the Tolerance (Reduce Poly) area to the side. There is a fairly small number in the box there and clicking Reduce Poly will strip out coordinates that are smaller than that number. Larger numbers will reduce the polygon more. Don't worry, the system keeps a copy of the original polygon on disk so if you overshoot and make it too bad of a quality, you can try again with a smaller number. If you have a new polygon set and want to completely overwrite this saved disk image, you will need to check the "Replace Original Source Poly" checkbox and it will be overwritten with your new data.

Once all this is complete, you will need to attach your MapLocation to a MapImage. You will probably not want to attach your MapLocation to a MapImage someone else has already completed, so for your first MapLocation you will want to click [Add New Map]. You will generally want to have the same Active and Inactive dates as your MapLocation. Select the Category of map you are creating and the Geographic Coverage of your map. Ideally, add the link to where you got the map data in the Source field. To name your MapImage, describe what the map is - preferably in descending order of geographical importance - example: MN Minneapolis City Council Districts. (Start with the country if not US). Do not add years or other dates to the name as those will be automatically added from the Active and Inactive dates.

After your first MapLocation, you can attach additional MapLocations to this MapImage by clicking [Attach Existing Map]. Your most recent MapImage should appear first in the list and you can click [Attach]. If it does not appear, you can search for it.
ContributorRP 
Last ModifiedRP  - October 09, 2021 01:58pm


DISCUSSION
[View All
31
Previous Messages]
 
DFL:9560IDMN ( 355.6826 points)
Fri, March 13, 2020 11:53:49 PM UTC0:00
[Link]

I have pages like these for example, but I'm not sure if this is right

 
D:1RP ( 5506.7227 points)
Sat, March 14, 2020 03:11:44 AM UTC0:00
Those don't appear to work. They must have changed something.

 
Un:9757BrentinCO ( 6338.6216 points)
Fri, November 5, 2021 04:24:38 AM UTC0:00
Hi. Is anyone aware of other website that convert the vector images or PDFs into KML data?

I've seem to have exhausted my monthly data limit on MyGeoData Cloud converter that is linked above
[Link]

I'll probably spring for a monthly subscription but before I do, I was curious if anyone was aware of alternatives. I'm starting to get into this and expect that beyond doing the congressional maps, I'll be uploading the approved legi maps, council maps, etc.

 
I:6738IndyGeorgia ( 3906.0425 points)
Fri, November 5, 2021 04:29:46 AM UTC0:00
This can work for certain types of files (not familiar with PDF to KML): [Link]

Thanks for adding these!

 
Un:9757BrentinCO ( 6338.6216 points)
Fri, November 5, 2021 05:22:42 AM UTC0:00
Thanks IndyG. I'll try that out. Doing the prep work now for the Colorado Congressional Maps. Expect to start posting this weekend.

 
D:1RP ( 5506.7227 points)
Fri, November 5, 2021 02:25:13 PM UTC0:00
I don't think you can covert PDF to KML.

 
D:6454Mr. Matt ( 1761.4666 points)
Fri, November 5, 2021 03:48:55 PM UTC0:00
I think in very rare cases, the PDF might have geolocation data that you can just directly import into your favorite GIS software. When I did Kenosha County, WI's supervisor districts, I was getting ready to retrace all of the district boundaries, but I happened to import the PDF [Link] into QGIS and it popped in exactly at the location of the county's boundary location thus saving me some time for that exercise. I'd bet if the PDF that is created was exported directly from GIS software, the geolocation data is embedded in the file.

 
D:1RP ( 5506.7227 points)
Fri, November 5, 2021 04:25:15 PM UTC0:00
Oh wow. I didn't even know it had that capability. I know most PDFs don't have geodata.

 
Un:9757BrentinCO ( 6338.6216 points)
Fri, November 5, 2021 05:57:09 PM UTC0:00
On a side note, having success just e-mailing the commission and asking them for KML files for each district so I don't need to do any conversion.

I don't know why I am so surprised - but it seems like when I e-mail government folks locally here in Colorado they are more than happy to help with exactly what I need.

 
I:6738IndyGeorgia ( 3906.0425 points)
Fri, November 5, 2021 06:08:44 PM UTC0:00
That's great; local government people are fantastic. I remember getting a bunch of overseas maps as well by emailing the different commissions. Only one I struck out with was the Nunavut Electoral Commission; guess I should have put my request in Inuktitut.

 
I:6738IndyGeorgia ( 3906.0425 points)
Sat, November 6, 2021 07:33:28 PM UTC0:00
Throwing this out there, but if anyone perusing the international pages of OC sees a need for a set of maps that we don't have, please let me know and I will try to track them down. I got Portuguese municipalities done recently and I'm still trying to decode the Norway counties file that I have.

 
Un:9757BrentinCO ( 6338.6216 points)
Sun, November 7, 2021 08:55:50 PM UTC0:00
Before I go further. I've created the new map for CO CD1 which starts in Jan 3 2023. It looks like I've done this right with the data I have from Redistricting Commission as I look at the map that was generated.

But I'm having trouble understanding what I need to to do attach it to a new map.

Can I only attach to a GIF? Does it need to have other properties? ]

I have all the new CD maps in PDF and can convert if that helps.

Thanks in advance for any help. I'm almost there and should be able to get all CD, State Legislative, County, and City updates with this last bit of help.

 
I:6738IndyGeorgia ( 3906.0425 points)
Sun, November 7, 2021 09:00:41 PM UTC0:00
You need to attach it to a (new) map. Here's the map for the 2013-2023 congressional districts: [Link]

 
D:1RP ( 5506.7227 points)
Mon, November 8, 2021 12:18:13 AM UTC0:00
Click "Add New Map" on this page: [Link]

 
D:1RP ( 5506.7227 points)
Tue, November 9, 2021 07:39:22 PM UTC0:00
Looks like you figured it out.

 
I:6738IndyGeorgia ( 3906.0425 points)
Tue, November 9, 2021 07:43:14 PM UTC0:00
Wait, I think the new map has been placed in the old group.

 
D:1RP ( 5506.7227 points)
Tue, November 9, 2021 08:22:33 PM UTC0:00
I think you need to clean up the whitespace a bit. It needs to be number, space, number, return with no extra items. (Or number, comma, number also works.)

 
Un:9757BrentinCO ( 6338.6216 points)
Tue, November 9, 2021 08:55:49 PM UTC0:00
Yes. I originally attached to an old map. I went back and created a new map to attach all the congressional districts to. I think i have it now. double check and let me know if I need to change anything.

On the whitespace I'll go back and clean that up. no problem on that.

 
D:1RP ( 5506.7227 points)
Tue, November 9, 2021 09:03:55 PM UTC0:00
BrentinCO: On the whitespace I'll go back and clean that up. no problem on that.

Remember to click the "Replace Original Source Poly" checkbox when you do that or any Reduce Poly will revert to the original.

And if you could also Reduce Poly to make the polugons smaller that would be great. Try and get them down into the teens.

 
D:1RP ( 5506.7227 points)
Tue, November 9, 2021 09:05:30 PM UTC0:00
Also, don't put dates in the name of the map image. The system automatically adds them from the Start and End date fields.

 
Un:9757BrentinCO ( 6338.6216 points)
Tue, November 9, 2021 09:13:33 PM UTC0:00
Got it. Will do that. with reducing poly.

I see that the source data I'm using takes the decimal place out 12 places instead of 6 which the 2013 maps use. Is that increasing the size of the file?

The editor I'm using I can easily reduce down to 6 decimal places if that is recommended.

 
D:1RP ( 5506.7227 points)
Tue, November 9, 2021 09:33:29 PM UTC0:00
Yeah, reducing the number of decimal places will reduce the file size without having to use the Reduce Poly as much. There was a chart I saw that showed what each decimal place came out to. Let me see if I can find it... [Link]

 
D:1RP ( 5506.7227 points)
Tue, November 9, 2021 09:34:56 PM UTC0:00
What is 12, the width of an atom?

 
Un:9757BrentinCO ( 6338.6216 points)
Wed, November 10, 2021 01:13:15 AM UTC0:00
Makes sense. I'll do a pass on that tomorrow. Yes. 12 seems excessive LOL.

 
I:11209Kirstenwilliamson23 ( 0.0000 points)
Mon, November 15, 2021 03:12:11 AM UTC0:00
Maps really confuse me if it weren’t for today’s technology with the GPS tracker and automatic orientation of the compass. Back then, maps were useless for me.

[View Next Page]