Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've searched the question in this blog. Maybe I don't use the right words but anyway my problem is not present in any post so I'll try to explain my question by opening a new one.

I have a polygon shape (eg states). I calculated the centroids and the function saved them in an another file (Feature To Point function).

Now I have 2 separated layers, point and polygon shape (centroids and polygons), but I need a unique shape. Functions Merge and Union (if I understand what I've read) can only be made between shape with the same feature class (point-point, line-line, polygon-polygon).

I need a layer that contains, for example, the polygons of the states and their centroids Is there a way to get the results I need? Or a procedure to get the centroids of the polygons on the same shape? I hope I explained Sorry for the bad english!

share|improve this question
1  
Why do you need them together? What calculations/display/analysis do you want to perform that requires them to be in the same layer? If we know what you are trying to do, then we may be able to come up with better alternative solutions. –  Baltok Mar 12 at 13:32
1  
I was commissioned to create a shapefile to be imported into Micrososft sql server database that contains the polygons of the areas and their centroids. Centroid will be then related information. I don't know much more and my english is not very good (I'm sorry) –  Tsunanya Mar 12 at 14:20

3 Answers 3

up vote 2 down vote accepted

No, the Esri data model does not support multiple topology classes in a single column. Nor does it support multiple columns with geometry. The closest you can come is to add the point as Well-Known Text in a string field.

share|improve this answer
    
Thank you. One question:If I add the point as Well-Known Text (I don't know how make this) in a string field, can I see point and polygon in the same map to insert in SQL Server database in the same table? –  Tsunanya Mar 12 at 14:05
1  
No. One geometry column is all you get. You seem to have wanted to ask a different question, "How can I render a polygon feature class with both polygons and labels using ArcGIS for Desktop", which has a half-dozen different answers, depending on whether you have an enterprise geodatabase or are just using Query Layers out of the database (which you never mentioned). If you ask the root question, instead of how to implement an incomplete solution, you'll get better answers. –  Vince Mar 12 at 15:10
1  
Yes I know and I'm sorry. I'm junior and my english is poor. Unfortunately, the information I have given are few and fragmented, I only know is that I must create a shapefile to be imported into Micrososft sql server database that contains the polygons of for example states and their centroids. Centroid will be then related information. But I do not know how to do it, if it's possible Thanks –  Tsunanya Mar 12 at 15:40
    
It would be best if you understood your task fully before trying to explain what you want to others. Centroids are NOT the best way to manage a join -- use them ONCE to establish a numeric or string key, and you won't have to deal with the points ever again. In the meantime, maybe you should withdraw this question and ask a new one, describing your all your inputs and goal (but figure out how you're going to get that shapefile into the database, or the shapefile isn't your goal either). –  Vince Mar 12 at 16:27

By the way both QGIS and ArcGIS use vector layers, there is no way you can have both points and polygons (or lines) represented in the same layer.

Yet, if your data is stored in a spatialite or postgres\postgis database, it's possible to have different geometries in the same column of a table. Or even, for the same feature, have different columns with different representations of it (polygons and points, for example).

Inside the database, you will be able to preform several spatial analysis, and retrive new data from it but to visualise it in QGIS or ArcGIS, you will always need to filter the table to show only one type of geometries. Openjump GIS can actually open tables with different geometry types and even geometry collections, but I'm not sure if it's of any use for you.

share|improve this answer
    
Thank you for you answer. This shape will be import into a Microsoft sql server database and to the centroid will be then related some information –  Tsunanya Mar 12 at 14:22

The Question does not state a requirement to store points and polygons in the same column, and the title mentions feature classes while the Question body speaks more of layers, so other approaches may be suitable for you.

Although ArcGIS for Desktop does not allow you to store polygons and points in the same shapefile or geodatabase feature class, it does allow you to store them within a group layer in a map or layer file.

To see this:

  1. Add your point and polygon datasets into your map
  2. Use the Shift key to have both layers highlighted in the Table of Contents at the same time
  3. Right-click and choose Group

You should now have a layer group which you can rename and use to turn both points and polygons off/on together.

If you want to store polygon and point features within a feature dataset then I recommend that you investigate topology.

share|improve this answer
    
Thank you. One question: if I Add your point and polygon datasets into my map Use the Shift key to have both layers highlighted in the Table of Contents at the same time Right-click and choose Group Then... Can I insert the shape in SQL Server database in the same table? –  Tsunanya Mar 12 at 14:08
    
@Tsunanya No - that is where you hit the limitation that the others have mentioned. –  PolyGeo Mar 12 at 19:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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