|
POST
|
I meant to include the following in my original reply but had to step away. You can see what I am talking about by using three different ways to create an ArcPy Polygon and then return the WKT for all three: >>> polys = [
... arcpy.FromWKT("POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))"),
... arcpy.FromWKT("MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)))"),
... arcpy.Polygon(
... arcpy.Array([
... arcpy.Point(0, 0),
... arcpy.Point(1, 0),
... arcpy.Point(1, 1),
... arcpy.Point(0, 1),
... arcpy.Point(0, 0)
... ])
... )
... ]
...
>>> for poly in polys:
... print poly.WKT
...
MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)))
MULTIPOLYGON (((0 0, 1 0, 1 1, 0 1, 0 0)))
MULTIPOLYGON (((1.0001220703125 0, 1.0001220703125 1.0001220703125, 0 1.0001220703125, 0 0, 1.0001220703125 0)))
... View more
04-14-2015
06:08 PM
|
1
|
0
|
2353
|
|
POST
|
This is one of those lost in translation moments. Esri doesn't implement a Polygon and Multipolygon, they implement a "Polygon" that is a Multipolygon. Esri's polygon can be single or multipart, but they treat them both the same for translating to OGC's WKT.
... View more
04-14-2015
02:51 PM
|
1
|
0
|
2353
|
|
POST
|
What version of ArcGIS are you using? I ask because there were some changes, I would argue bugs, with how serviceProperties behave differently in ArcGIS 10.3 than ArcGIS 10.2.2. Not sure if that could affect isServiceLayer as well or not.
... View more
04-13-2015
03:17 PM
|
1
|
1
|
1167
|
|
POST
|
+1, automation is the way to go with tasks like this one.
... View more
04-13-2015
01:02 PM
|
1
|
0
|
1427
|
|
POST
|
Have you reviewed the Understanding how to use Microsoft Excel files in ArcGIS section of the Help, particularly the "few things to keep in mind" items? Is this an XLS or XLSX file? What version of MS Office do you have installed?
... View more
04-13-2015
12:58 PM
|
0
|
0
|
662
|
|
POST
|
Your problem sounds familiar, not sure if I have run into it before or helped someone who has. Anyhow, part of your problem is caused by misunderstanding the ArcPy Result object. The result object from calling Polygon to Raster (Conversion), specifically the getOutput method of that result object, isn't a Layer object or even the name of a layer in the map document. In this case, the result object is returning the path to the newly created raster dataset. RemoveLayer is throwing an AssertionError because it needs a "reference to a Layer object representing the layer to be removed," which the string you are passing it from the result object isn't. It appears you are having difficulties enumerating layers in the map document. Can you provide a code snippet where you run the geoprocessing tool and attempt to list all the layers afterwards?
... View more
04-13-2015
12:06 PM
|
2
|
0
|
581
|