I am trying to make a map showing which zip codes are served by which hospitals. There are five hospitals and each can serve one or more zip codes. I'd like to show each zip code with a dots of different colors to represent the different hospitals serving that zip.

I'm trying to assign colour circles to a map with zip codes. Each zip code has hospitals assigned to it and I would like the hospitals to be represented as colour circles on the assigned zip codes. So, for instance if a zip code has three hospitals I would like the hospitals to be represented by three different colour circles each.

The hospitals do not have addresses since they are assigned to zip codes in which they do not reside. So, I used the zip codes to get the Latitude and Longitudes. In most cases the hospitals have similar latitude and Longitude because they were assigned primarily by zip code.

I've tried layer properties and categorized symbol but it just assigns one color circle per zip code. Do you know what I'm doing wrong?

enter image description here

enter image description here

  • 1
    I'm not entirely clear if I understand what you want to do, but it sounds like you just want each hospital to be a different color. Do you have individual points for the hospitals? If so, you can just symbolize them on unique values and pick the FID field or something. A screenshot showing what you're currently getting might help understand the problem here.
    – Chris W
    Jun 13, 2015 at 1:16
  • Hi Chris, Yes, I want each hospital to be a different colour and when I go to the layer properties it does show me that but then it only shows just one colour circle in the zip codes on the map. By individual points, do you mean longitude and latitute? If so I just assigned based on zip code, so I didn't assigned by hospitals. What is the FID field and how do I assign unique values? I'll send the screen shots tomorrow morning. Thanks for helping.
    – Andrew C.
    Jun 15, 2015 at 0:52
  • Without screenshots it's hard to say, but I suspect what is happening is that your points are all stacked on top of each other. If you just assigned them via zip code it probably created all the points at the centroid of the zip code. You'd need to spread them out a little to see the different colors. We'd need to see a screenshot of your current map, the layer properties, and perhaps the two attribute tables you have to offer much more - it's not entirely clear how your data is set up.
    – Chris W
    Jun 15, 2015 at 20:07
  • Hi Chris, I've attached the screenshots. If you would like to see the excel sheet I'm using please let me know and I can send it to you. You mentioned spreading them out, how do I do that? Thanks again.
    – Andrew C.
    Jun 16, 2015 at 13:09
  • I'm also confused by the question - you mean that all hospitals associated with one zip code should have the same colour, or that where more than one hospital with one zip code should have different colours? I second the comment about you probably having overlapping points (so one will hide the other). In simple terms you could separate these by hand... moving one at a time... or by changing the lat/lon a little bit. Overlapping points/features are challenging. Have you gone looking for a proper dataset with actual hospital locations rather than using zip codes? Jun 16, 2015 at 13:32

1 Answer 1


The two main problems you have here are a many-to-many relationship between your two datasets (one hospital can serve many zips, one zip can be served by many hospitals), and that you aren't actually showing the geographic location of the hospitals. Most GIS software doesn't handle M:M relationships well, and it takes some experience and understanding of relationships in general to know how to best address that issue depending on the data and what you want to do with it.

In your case, the simplest solution is probably to create a new point feature class with a hospital name attribute. You can then manually place point features in each of the zip codes for whichever hospitals serve it, and give them the appropriate name in the attribute field. Then your symbology as you have set it up should display the map the way you want it to.

A couple of things to note: Typically when you add xy data from a spreadsheet, the points are only temporary until you save them out to new file. Also, if there are other attributes you want to keep on the points from the spreadsheet, you'll have to make some adjustments because the available join methods don't handle the M:M relationship very well. I'm not sure exactly what method you're using to 'assign' the hospitals to the zip codes, and from the screenshots it's unclear if you have multiple points per zip code stacked on top of each other or just a single point because it's only returning the first matching record. If you have stacked points, my earlier comment about spreading them out just means editing that point layer and manually moving them around a bit in the zip code boundary so they can be seen individually.

  • Thanks Chris. Please forgive me but I'm very new to this, can you show me how to go about creating the point feature class and what you mentioned in the second paragraph? My deadline for this is Thursday, so if you can point me to a tutorial or anything I can work from that would be great. Thanks again for your patience and assistance.
    – Andrew C.
    Jun 16, 2015 at 18:10
  • @AndrewC. I'm afraid a step-by-step tutorial for what you want to do would be a bit long for the GIS.SE format. There is a tutorial at qgistutorials.com/en/docs/digitizing_basics.html that should walk you through most of what would be necessary. It's about more than you want to do (since you're not digitizing features, just creating them), but all the necessary steps for creation and attributes are in there. I would just read through it to pick out what you need. That site has other tutorials as well, as does the QGIS documentation.
    – Chris W
    Jun 16, 2015 at 20:38
  • Thanks a lot. I'll check it out. Thanks for everything. Sorry for all the trouble.
    – Andrew C.
    Jun 16, 2015 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.