I am trying to create a colored polygon using GDAL library. I am currently using the C Shape Library, but it does not allow me to use colors. Is this possible in GDAL? How?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Shapefiles don’t store colors.
They only contain the geometry (points, multipoints, lines, polygons, etc) of the features and their attributes. The color of each feature depends on the software that you use to display the shapes. For instance, in ArcGIS Desktop you would use the ‘Symbology’ dialog box to choose colors. They can depend on the value of one or many attributes. In this case, the symbology can be stored in a separate “layer” file (.lyr).