Archive for the ‘Cartography’ Category

Unable to delete representations – Problem solved

What I wanted to do

Test Representation in ArcGIS

What I have

  • Oracle 11g
  • ArcSDE 9.3
  • ArcGIS for Desktop (according to recent ESRI product naming announcement)


Here is what happened:

I was learning how to use representation. So I created a representation on a feature class in my SDE database on Oracle. Once the representation is created, in ArcCatalog I looked into the attribute table of the feature class and saw two columns: ruleID and override. I right clicked on the columns and delete them. And then I went to the properties of the feature class and delete the representation from Representation tab.

Now annoying things happened: I restart ArcCatalog and open the properties of the feature class, navigate to Representation, nothing shows up in the list, which is normal because I created and then deleted the representation. But if I click new and create a new representation, the one that had been created and deleted would show up together with the new representation in the list. If I select the ghost representation and try to delete it, I get the Unable to delete representation notice. What’s worse is that this ghost now shows up in all OTHER feature classes representations tab and I can’t get rid of it! Even if I remove this feature class the ghost representation is still there.


I haven’t seen similar issues posted on the Internet but the solutions to  many representation issues involve do something about an Oracle system table named SDE.GDB_ExtentsionDatasets. So I looked into this table in Oracle and found the dead body of that representation ghost. After removing the record, the ghost went away!

Create Complex Line Style with GeoServer 2.x

GeoServer recently released 2.1.0. Among all the impressive improvements, I found line styling improvements most helpful for me. Prior to 2.x, there is nothing you can do but scratching your head when it comes to creating line style of alternating symbols, not to mention using custom smybol in the alternating symbols line style. 2.x is a dream comes true for me.

What I wanted to do:

Create a line style with alternating plus and minus sign and a fish symbol. Like this:

What I have:


To create a line style like that, I need a “+” symbol, a “-” symbol, and a fish symbol. For “+” symbol, I use well known name “Cross”. For “-” symbol, there is no well know name symbol so I use dash line instead to create the effect of “- – – “. and “-” symbol. For fish symbol, I have two source options: create my own or snapshot one from an existing image using any software that can clip an image. I also need to choose a graphic format to store the fish symbol. I decided to go with SVG instead of raster-based format such as JPEG and PNG because JPEG or PNG image might be resampled when you specify a pixel size of the image in the SLD that is different from the image’s original size. The resampling made the image look really ugly on map. Here is what I did to create the sytle:

  1. Create a fish symbol using Online Paint
  2. In SLD, set a FeatureTypeStyle with two LineSymbolizer. One line symbolizer with “+” and make it dashed graphic stroke. Set another line symbolizer with just stroke and make it dashed, which create a style of “- – – -“.  Combining this two symbolizers together gives me something look like “+-+-+-+-“
  3. Set another FeatureTypeStyle with  line symbolizer of external graphic. The external graphic is the fish symbol created in step 1. Make the line dashed so that the fish appears on the line every few pixels
  4. Apply the SLD to the line layer in GeoServer
  5. Played with the numbers in SLD (width, dasharray and dashoffset) for a while to get the best symbol size, line weight and interval between symbols

Here is the SLD code example: LineStyleSLD

Note: GeoServer 2.x allows user to create marks with True Type Font (TTF). But watch out if your testing operating system is different from your operational operating system. When you test in Windows environment, TTF is accessible. But then when you move the tested SLD to GeoServer running on Linux, the marks defined in TTF probably won’t show up because the TTF is not installed on Linux.