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 collaborative political 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 Previous Messages In This Discussion (31 Previous)]
Get Firefox!