[R-sig-Geo] Writing ArcGIS Shapefiles from R; advice?

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Wed Sep 8 00:54:14 CEST 2010


On Tue, Sep 7, 2010 at 11:07 PM, Gavin Simpson <gavin.simpson at ucl.ac.uk> wrote:

> Second Q is; is there a way to include information about how ArcGIS
> displays each layer/shapefile? For example, we'd like to give each
> layer/shapefile a particular fill colour, so that when loaded by a user
> into ArcGIS, the particular depth polygons have a nice gradient
> representing depth. Is this even remotely possible from within R, or is
> this something ArcGIS does and is separate from the shapefile per se?
>
> Currently I am using writeOGR to read out these objects to ESRI
> shapefiles.
>
> The reason I ask these questions is because we have a lot of these lake
> bathymetries and dealing with them in ArcGIS (to get separate layers and
> colour those layers accordingly) by hand is a non starter and we don't
> want to start writing VB scripts in Arc at this stage.
>
> Thanks in advance for any pointers or suggestions you may have. And
> apologies again for showing my ignorance as regards shapefiles.

 There are some open standards for styling geospatial data, namely SLD
and OpenGIS Symbology Encoding. They are XML files that define how map
layers appear.

 If ArcGIS supports these then you just have to work out how to write
the XML for the data. That probably means understanding the OGC Specs:

http://www.opengeospatial.org/standards/sld
http://www.opengeospatial.org/standards/symbol

 or you might find some desktop GIS that can save them - possibly Qgis or gvSIG.

I have a vague memory of once reverse-engineering an ArcGIS file that
encoded the style of a map, but it was all binary and a mess and I'd
need a few examples to work it out.

 A bit more googling shows there is an SLD plugin for Qgis and ArcGIS
can export them. So that might work...

Barry



More information about the R-sig-Geo mailing list