Tag Info

New answers tagged

2

I am going to write this in VB.Net since that is what I know, and hopefully you can figure out the C# way to do it: To find all the layers, use IEnumLayer interface: Dim pEnumLayer As IEnumLayer = My.ArcMap.Document.ActiveView.FocusMap.Layers(Nothing, True) The second argument determines if this drills down into composite layers. To get the layer from ...


0

I was able to achieve it by following - IEnumStyleGalleryItem enumStyleGalleryItem = styleGallery.get_Items("Marker Symbols", filePath, null); enumStyleGalleryItem.Reset(); IStyleGalleryItem styleItem = enumStyleGalleryItem.Next(); IGeoFeatureLayer geoFeatureLayer = (IGeoFeatureLayer)pointsFeatureLayer; ISymbol symbol; IUniqueValueRenderer ...


0

I started down a similar path with Shape2SQL, but now I am using the Natural Earth shape files - they are great and cover all countries down to an incredible level of detail (railroads!): http://www.naturalearthdata.com Laurent Dupuis has shared his amazing project which shreds ALL of the natural earth data (including all the dbf attributes) straight from ...


0

Unfortunately, the only answer I found was to dive into C/C++ instead of the C# wrapper. There just wasn't enough exposed functionality for me to using the C# wrapper.


0

You will need to track the current active view and unhook the old active view (required|optional ?) and hook the new active view whenever it changes. Note that ViewRefreshed is not called every time the view is actually redrawn, but it does seem to be called whenever the code explicitly calls Refresh or PartialRefresh and when the redraw toolbar button you ...


0

If you are trying to rename the field STR_NAME to STREET, ArcObjects does not allow you to do that. You will have to create the field STREET, copy the data from STR_NAME into it, then delete STR_NAME.


2

It seems you get can get or set the current tool using iApplication.CurrentTool property. See here. Whether or not this works for custom tools I'm unsure.


3

Not really no. You only options for QGIS based applications are Python and C++, unless you want to build a web app which calls QGIS server to show the map then you can use what ever you want as it's just making WMS calls to the server. Creating a standalone application with Python using QGIS is pretty easy. Getting started with a standalone app in Python: ...


0

You need to reference My.ArcMap.Application.Document. Code snippet is in VB, but will produce the map layer count. Dim mxdoc As IMxDocument Dim pMap As IMap mxdoc = CType(My.ArcMap.Application.Document, IMxDocument) pMap = mxdoc.ActiveView.FocusMap Dim layerCount As Integer = pMap.LayerCount MessageBox.Show("Layer Count = " & layerCount.ToString)


0

DGNLib is a small C/C++ library.


0

I was able to achieve results as following: UID uidDockWin = new UID(); uidDockWin.Value = "esriEditor.AttributeWindow"; ESRI.ArcGIS.Editor.AttributeWindow attWin = editor.FindExtension(uidDockWin) as AttributeWindow; attWin.Visible = true;


0

There is the event IActiveViewEvents.ViewRefreshed.


0

You probably just need to use the IActiveView.Refresh method to achieve what you're looking for. You can get the active view from the MxDocument.ActiveView property. The help/snippets should lead you the rest of the way.


2

I was able to achieve results as following: public void SaveProject() { UID uid = new UIDClass(); //uid.Value = "{119591DB-0255-11D2-8D20-080009EE4E51}"; uid.Value = "esriArcMapUI.MxFileMenuItem"; uid.SubType = 3; ICommandItem item = ArcMap.Application.Document.CommandBars.Find(uid, false); item.Execute(); } Appreciate your help.


0

Ok, I figured out how to do this. As Stefan suggested, I had to add a couple of parameters to the URL: geometry (value = e.g. 639739.5,7598259.3) geometryType (value = esriGeometryPoint) spatialRel (value = esriSpatialRelWithin) Here is an example call: ...


0

Take a look at the documentation http://resources.arcgis.com/en/help/rest/apiref/ You're probably looking for the mapservice or feature service query operation. Set the geometry and spatialRel parameters. The geometry would be your points or lines.


1

you sure obtain IApplication/IMxApplication hook somehow in your code then you can obtain IMxDocument pointer and then cast it to IMapDocument: IMxDocument ipMxDoc=(IMxApplication)ipApp; //Suppose ipApp has been obtained via hook passed in OnCreate method of ICommand interface IMapDocument ipMapDoc=(IMapDocument)ipMxDoc; ipMapDoc.SaveAs(fileName); ...


3

You will want to create a ToolControl button that allows you to click on a map as opposed to a button which does something when you click on it. Then grab the point, create a spatialfilter and query your polygon layer, this returns a Feature object which you can return the various address components and populate some form that you created. The bold words ...


1

Works with this using System; using System.Collections.Generic; using System.Linq; using System.Text; using ESRI.ArcGIS.Geodatabase; using ESRI.ArcGIS.esriSystem; namespace SDEtest { class Program { static void Main(string[] args) { ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop); ...


0

A better approach is probably to geocode the addresses and work with point-to-point distances. If you can't do that, work with five digit zip codes (discard the last four digits of a zip-9). From the USPS you can get the Post Office address for each 5 digit zip code which can be geocoded. Third parties offer zip centroid or zip polygon tables. Zip ...


1

As @radouxju says, you have two components of a 3d cartesian conversion. It sounds like you are really looking for a Map Projection. This converts the surface of the Earth (latitude, longitude) into flat 2d cartesian coordinates. It is impossible to do this without some distortion. Hence there are literally thousands of possible projections. You choose the ...


1

the two equations that you are using here are for the conversion to a 3D cartesian coordinate system (for a 3D plot with the origin at the center of the Earth), so you must have the Z-axis, otherwise you will represent the projection of your points on the equatorial plane (which is probably not what you want). public static double GetZCoord(double lat, ...


0

This is an older one, but since it does not have an accepted answer: GRASS GIS is divided into modules. Each module is a command line program which can by invoked in many ways. Inside GRASS itself, it is through the system command line or GUI (with our without auto-generated GUI dialog). Most of the GRASS functionality is exposed through modules. There is ...



Top 50 recent answers are included