Tag Info

Hot answers tagged

5

This is a great question, I had to do something similar recently but with a much smaller dataset, so I was able to use a simple intersection with some extra visual quality checking and it was fine. But here's an idea for this, though I don't have code, and it's kind of a hefty process. Definitely test with a sample from the full dataset first. You can ...


3

Here's a script that might do it for you. The native arcpy.Geometry class has a method called "cut" that will cut any feature using another polyline. Unfortunately, since you're using "points", we have to make "fake" lines out of these points. I essentially made a scratch polyline with the points [(Point.X+10, Point.Y+10), (Point.X-10, Point.Y-10)] - e.g. a ...


3

There is a standard already there called ArcInfo ungenerate(export). Using the ArcInfo generate(import) and ungenerate command. But there are many other technologies doing the same thing now such as json, landxml, esrixml workspace document and many others I can't even keep up with. ETGeowizards contains a tool to create the ungenerate file. go to ...


3

In Field Calculator, you can try this Python code: ",".join({"1":"White","2":"Black","3":"Red"}[val.strip()] for val in !INPUT_FIELD_NAME!.split(",")) All you need to do is to pick your enumeration field for !INPUT_FIELD_NAME! and make sure you are using Python Parser! UPDATE OK, the below is another solution by creating a look-up table (dbf table in ...


2

If you want to add some attributes from red layer to blue layer and one attribute is common in both layers, you have to use Add Vector Join. I've written about that here. Right click on your red shapefile layer on Layer Panel and choose Properties. Then go to Joins tab. Press the + button, it will create new join. Join layer is your red shapefile layer. ...


2

Try saving the mxd using the save() method or just refresthing the display/TOC. If scripting is used to modify the appearance of some map document elements while using the CURRENT map document (for example, change a layer name, the data frame extent, and so on), the map may not automatically update with each executed line of code. To refresh the ...


2

To find the name of the dataset as stored in the database use IDataset.BrowseName. IDataset.Name will give you the layer name as it is named in ArcMap. You should also test that the layer can be cast to IDataset: If TypeOf currentLayer Is IDataset Then... Things like group layers don't implement IDataset, and will cause an error.


1

There are no problems with the coordinates included in your code. The problem is with, how you included them. The coordinate transformation goes smoothly as far as I can see, but I changed your iteration technique to my own, because for me, the one included in your Fiddle was a bit strange (I hope that won't lead to a confusion). The first problem was with ...


1

As @Adam, noted you cannot style the web service layers. However you may download the related year shapefiles from here: National Transportation Atlas Database


1

That layer is an ArcGIS.com portal item (basically a web service), so you're unable to modify the symbology from how it is presented by ESRI.


1

Your approach is calling either this or that for every single field in the attribute table. That might mess things up. Instead try field_names = [field.name() for field in self.layer.pendingFields()] if 'elevation' in field_names: do this else: do that


1

According to the Leaflet documentation, the layer config is an object literal with layer names as keys and layer objects as values. That means you can use [] to set the object key, here is the modified codes: var layerName = feature.properties.condition[0]; //layer control var baseMaps = { "OpenStreetMap": OSM, "Aerial Imagery": ...


1

All understandable! So for scenario 1 you created a layer file called red_sections.lyr then added that to MXD_2. In windows explorer if you look at the folder with the red_sections.lyr file it is only a few KB in size, so it cannot possibly be the data (all your polygons). A LayerFile which is what you created just holds symbology any definition queries plus ...


1

You are not telling us how you get the WMS in Leaflet: are you using the default object or a plugin? I have experiences the "cut" issues with labels too. I suspect that the problem might come from the fact that Leaflet WMS object is a extension of the Tile object and somehow in the request processing somehting ges wrong. The geometric object to which the ...


1

I much prefer the answer from @dmh126 as his method allows your red_line layer to be updated quite easily. Just to add an alternative, you can use the Join attributes table tool from the Processing Toolbox and select your layers with the common field. Note that this method creates a new shapefile instead of updating an existing one:



Only top voted, non community-wiki answers of a minimum length are eligible