New answers tagged

4

If you don't see feature templates for a particular layer, you can add them via the Create Features window: Create Features window > Organize Templates > New Template > In the Create New Templates wizard, check the desired layers. What also works (and that I use to do because it's straightforward), is: starting the Edit session by right-clicking the ...


1

You can use a data-defined override in the properties of your marker to make the size of the marker dependent on a field, variable or expression:


0

I've never seen this button anywhere else in QGIS, but I agree that it can be useful. Here is a Workaround (a bit of python...) to achieve what you are after. Presuming you have selected something on a layer and this layer is selected in the layer tree (python speaking: iface.activeLayer()) you can do on the python console: l = iface.activeLayer() l....


0

I'll try to expand PolyGeo's answer in order for you to understand more easily: The script lines arcpy.GetParameterAsText() show that these code lines are normally run similarly to a tool from the ArcGIS toolbox. The script requires an "interface" where you enter the required parameters. You could substitute these lines with a path to your data, as in: ...


1

This script includes the following lines: allLayers = arcpy.GetParameterAsText(0) # Must be a multivalue in script tool params lyrList = allLayers.split(";") PNGPath = arcpy.GetParameterAsText(1) The arcpy.GetParameterAsText() functions are asking for two parameters from a tool dialog that you need to configure separately. They indicate that the script ...


0

Just make separate copies from your project file for home and work use. Data you save will be written to the layer source files, not to the project file. Once you have finished the homework part, you can take it to work and re-add the bad layers. If you have a difficult styling on layers, you might save it separately and add it too.


0

The best thing is to keep things simple. Most of all tile provider use 3857 and the simple way is to publish wms also in 3857. For wms server like geoserver is not big deal, he will give you wms in every projection you want.


0

There are several approaches to realize this as Mike already posted. Making a copy of the MXD or the layer files is a very good and pragmatic approach. Depending on the number of different symbologies it could get confusing very fast. Alternativly there exists the ESRI technology of representations to store different symbologies. The symbology here is ...


2

Since Winners is a list of integers, and MakeFeatureLayer is expecting a SQL string in a particular format, you need to convert. Here's a simple way: >>> Winners = [1, 4, 59, 330] >>> sql = "OBJECTID_12 IN ({})".format(",".join(map(str, Winners))) >>> print(sql) 'OBJECTID_12 IN (1,4,59,330)' Since your values are integers, you ...


2

If your mxd is open, use mxdloc = arcpy.mapping.MapDocument("CURRENT") Changes made to your mxd on your disk (by referencing the mxd's path) won't be visible if the mxd is open in ArcMap so depending on where you are running it you may need to add mxdloc.save()


0

OK there are a couple of options for you. Obviously business name matching won't work, spatial joins will be unreliable, and address formatting isn't the same. One possible solution could be rubber sheeting (http://desktop.arcgis.com/en/arcmap/10.3/manage-data/editing-existing-features/about-spatial-adjustment-rubbersheeting.htm). Rubber sheeting is ...


0

As I stated in a comment above, removing all layers from a map window, will eventually close the map. It might be faster just to close the map window: nMapWinID = FrontWindow() 'make sure the map window is at the front before running this Close Window nMapWinID Now the map window has been closed and you can create a new one. By the way, you can have more ...


0

Yes you can count points into polygons. On this training material you have a couple of alternatives to counting points inside polygons. You can actually do more than just counting, on those examples you'll see that you can do other aggregate operations like averaging or getting the maximum value of one of the attributes of the aggregated geometries. Maybe ...


0

Because you created your own style with the "reciprocite" layers baked in through Mapbox Studio, you don't need to re-add the layers. To toggle your layers with one button you will want to loop through your layers - copy and paste this into your script tags: Here is the working example: http://geo-odyssey.com/links/stack.html mapboxgl.accessToken = 'pk....


0

You are looking at leaflet documentation, so you can just use addLayer and removeLayer. I edited the example you linked to, http://leafletjs.com/examples/layers-control.html See a fiddle here turn on and off layers Basically, make your map var map = L.map('map', { center: [39.73, -104.99], zoom: 10, layers: [grayscale]...


3

I figured it out! It was something very small. Basically, the layers you would like to see displayed on the canvas is provided through canvas.setLayerSet(list_of_layers). # total list of layers actually displayed on map canvas canvas_layers = [] # load vector layers for files in os.listdir(source_dir): # load only the shapefiles if files.endswith("...


0

What you need to do is loop through the layers of the map window and remove them individually from the mapper window. This way they are not closed, just removed from the map. e.g. Dim nLayers, i, nMapWinID as Integer nMapWinID = FrontWindow() '// make sure the map window is at the front before running this nLayers = MapperInfo(nMapWinID, ...


0

I had a similar problem. You need to make changes in two different places -- CartoCSS and the custom HTML in the Legend tab. What happened for me was that editing the CartoCSS changed the colors on the map but not the legend. But you can manually change the legend in html as well. I copied the code from CartoCSS so that I could copy the correct hex color ...


1

Do read the Leaflet tutorial on using WMS - it specifically addresses how to use WMS services in other projections. Also note that you can not have raster layers in different CRSs in Leaflet. It's simply not supported due to the complexity of on-the-fly raster reprojection.


0

There is currently no way to do that in that actual editor, however it is possible using CartoDB.js. There are multiple ways to do this with CartoDB.js, take a look at the following two examples: http://bl.ocks.org/oriolbx/14786cdd2dca51f4ec9c http://bl.ocks.org/oriolbx/688c63b865e7045e9f90 The first one hides the other layers and only allows one to be ...


2

It would be the same as iterating through the layers. mxd = arcpy.mapping.MapDocument("CURRENT") # Uses your currently open MXD for df in arcpy.mapping.ListDataFrames(mxd, ''): # Loop through dataframes for lyr in arcpy.mapping.ListLayers(mxd, '', df): # Loop through layers # Any tools you want to run on each layer go here


2

Esri has a good help section on Working with group layers. Here are two approaches: 1) Select all the layers you want to group in the table of contents > right click selected layers > Group 2) Add a new group layer by right-clicking on the layers in the table of contents. Then simply drag and drop or add layers into the group. Make sure to select the ...


0

Finally got it to work. I ended up using identifyParams(). myMap.addEventListener(MapMouseEvent.MAP_CLICK, function(meEvent:MapMouseEvent):void { hidePopup(); // I have a popup method later on that hides or shows a popup containing a string var identifyParams:IdentifyParameters = new IdentifyParameters();...


6

You need to change your view in the Table of Contents. You are currently looking at the "List by Source View" This view does not let you re-order layers. In order to do that, you need to change to the "List by Drawing Order" view. You can tell you are in the drawing order view because the layer source path disappears from the Table of Contents listing.


-2

WGS 84 is not a projection. It is just a coordinate reference for the ellipsoid shape of the earth. The next step is to choose a projection for Cartesian representation. WGS 84 UTM 32N is a projection.(Using UTM) There lies the discrepancy.



Top 50 recent answers are included