Quantcast
Channel: Question and Answer » arcmap
Viewing all 248 articles
Browse latest View live

How to project WMS layers from GCS_WGS_1984 to UTM ED50 31N using ArcMap?

$
0
0

I’m using a WMS service to open different layers. Specifically I’m using this link:

http://w24.bcn.cat/WMSBaseGuia/request.aspx

I have the following problem. When I open these layers with Arcmap, its projection is:
Geographic Coordinate System: GCS_WGS_1984
Datum: D_WGS_1984
Prime Meridian: Greenwich
Angular Unit: Degree

However I would like to transform it (or project) to Europe UTM ED50 31N (units meters).

Anyone can help me to obtain this projection with ArcMap?


ArcMap 10.1, the identify tool does not show feature attributes on a query layer on a PostgreSQL database. Why?

$
0
0

I’m developing an ArcGIS 10.1 desktop map editing application using ArcEngine and ArcObjects. I’m using a PostgreSQL database. After a direct database connection (using a query layer), I displayed the map. My problem is, the identify tool doesn’t really identify the features and their attributes (= It doesn’t display the attribute values) Please, look the situation here, pictorially. Has any one encountered such a problem or has an idea about it? Please give me anything (as a hint) that you think would solve my problem.So much thanks.
Here is the code:

public void GetMapData()
    {
        workspace = GetWorkspace();
        try
        {
            mapQuery = "select * from public.t_parcel";
            sqlWS = (ISqlWorkspace) workspace;

            queryDescription = sqlWS.GetQueryDescription(mapQuery);

            string uniqueNameInTheWorkspace = "";
            sqlWS.CheckDatasetName(mapQuery, queryDescription, out uniqueNameInTheWorkspace);
            ITable queryClass = sqlWS.OpenQueryClass(uniqueNameInTheWorkspace, queryDescription);
            var queryFClass = (IFeatureClass) queryClass;
            parcelFeatureLayer.FeatureClass = queryFClass;

            rgbColor = new RgbColor {Red = 229, Green = 229, Blue = 199};
            simpleLineSymbol = new SimpleLineSymbol {Width = 2, Color = rgbColor};
            simpleFillSymbol = new SimpleFillSymbol {Color = rgbColor, Outline = simpleLineSymbol};
            pSimpleRenderer = new SimpleRenderer {Symbol = (ISymbol) simpleFillSymbol};
            var geoFeatureLayer = (IGeoFeatureLayer) parcelFeatureLayer;

            geoFeatureLayer.Renderer = (IFeatureRenderer) pSimpleRenderer;
            // Add the layer to the map control
            parcelFeatureLayer.Name = "Layer";

            axMapControl1.AddLayer(parcelFeatureLayer);
            axMapControl1.Extent = axMapControl1.FullExtent;
        }
        catch (Exception ex)
        {
            Debug.WriteLine(ex.Message);
        }
    }

 public IWorkspace GetWorkspace()
    {
        // Create the connection properties.

        IPropertySet connectionProps = new PropertySetClass();
        connectionProps.SetProperty("serverinstance", "172.20.0.71,5432");
        connectionProps.SetProperty("dbclient", "postgreSql");
        connectionProps.SetProperty("database", "geojson");
        connectionProps.SetProperty("authentication_mode", "DBMS");
        connectionProps.SetProperty("user", "postgres");
        connectionProps.SetProperty("password", "123456");

        // Create the workspace factory.

        Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.SqlWorkspaceFactory");
        var workspaceFactory = (IWorkspaceFactory) Activator.CreateInstance(factoryType);


        try
        {
            workspace = workspaceFactory.Open(connectionProps, 0);
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message.ToString());
        }

        return workspace;
    }

Understanding flow accumulation

Distance to, travel only on one surface

$
0
0

Looking to create a distance to wetland raster. However this travel distance must be through the water only.

I have tried setting land to a high cost (e.g. 99) however doing so I have to set each water cell to its own “cost” however I don’t want to calculate relative cost, I want the actual distance in Metres.

Select feature based on both its own attributes and another feature's attributes

$
0
0

I have two points within a polygon, each representing a specific event with a date (listed as 120101 and 120719). The polygon itself represent an event for an extended time period (start: 120626 and end: 130114). I’m working in ArcMap 10.2.

What I want to do is to be able to select the point that falls with the polygon’s time period by use of query. How do I do that?

Here’s a picture showing the setup:

enter image description here

Calculating distances in Geographic Coordinate System using ArcGIS for Desktop?

$
0
0

I work in a Geographic Coordinate System and using the “Generate Near Table” tool in ArcGIS 10.2 for Desktop.

I want to calculate the distances that each feature of the point layer has to the closest point (vertex) of the coastline (the coastline is a line shapefile).

The distance method I use in GEODESIC, but I cannot understand what is the formula with which it calculates distances, since euclidean distance is used only in PLANAR for projected data.

ArcMap Share As Runtime Content gives folder instead of .geodatabase file?

$
0
0

So I am trying to export a .geodatabase file that can be imported into my android application for offline maps. Following tutorials on ArcGIS website I was able to export map by using File -> Share As -> Runtime Content us ArcMaps 10.2 however the output was a folder with files as shown in image(image is on the root of the generated folder, Topographic is name of the map).
Root folder

Am I missing something?

Extract from raster by tightest rectangle mask without Nodata

$
0
0

I’m using ArcMap 10.2.2 and I have a raster that has Nodata around the edges. How can I extract the tightest rectangle from this raster that does not include Nodata? The screenshot may help illustrate my question.

This is my raster and Nodata is indicated as yellow. What tool/script can I run/write that will extract the raster based on the red bounding rectangle? The purpose of this is to NOT use manual/visual inspection to get the red bounding rectangle extent values. I intend to use whatever method that works to include in a larger Python script.

clip


Using ArcGIS SDK for Java to get Driving Directions

$
0
0

I’m very new to GIS and I may not know what I’m talking about at some points throughout this question so please bear with me. Currently I’m trying to make a Java application (using the ArcGIS SDK for Java) that finds a route (of streets) between two locations on a map without allowing any left turns. For the last couple of days I’ve been reading a lot of the pages on ArcGIS navigation…

For example (only a few):

https://developers.arcgis.com/java/guide/get-driving-directions.htm
https://developers.arcgis.com/java/guide/find-a-route.htm

…and unfortunately I’m still unclear to a number of things. I have a pretty general knowledge of how most of the processes work (i.e. creating a map) but I’m not quite sure how the actual routing works. I know there are two options (online and offline) to calculate a route but I’m curious as to which one would be better for my purposes. For example, I’ve notice when using an online route service to create a RouteTask and later solving that route to a RouteResult, everything is done on the ArcGIS servers. Meaning there’s no local algorithm I would be able to change to eliminate left turns. Upon realizing this I looked ways of doing this locally so that my application uses a .geodatabase file to do the routing all offline. That’s where I get stuck, I’m unsure how to optain a .geodatabase file with all the information that I need to write an algorithm to do routing without left turns. I’m not sure if I have to manually make one or if I can find one online. And then once I have one, how would I go about actually making a route with the data?

Am I on the right track with my thinking here, or have I missed something and really I could achieve what I need to do with the online service?

If anyone is able to help me with any of these questions I’d greatly appreciate it.

Is there an equivalent of “Not ” in symbology categories with unique values, many fields

$
0
0

I would like to symbolise based on 2 date fields (d1,d2) in a layer. I would like to be able to have 3 different symbols:

  1. d2 is NOT null
  2. d1 is null AND d2 is null
  3. dl is NOT null AND d2 is null

Is this possible at the symbology definition level? Is there a way of specifying a value <not null> or <any other values> on a per field basis as you can for <null>?

Clipping vector data (Point) with one class in symbolised raster

$
0
0

I have some .asc raster data I symbolised with ranges in two classes. Say 2.145 to 10.000 and 10.001 to 30.1254. Now I want to clip vector data with the area covered by 2.145 to 10.000. How can I achieve this in ArcGIS, PostGIS, or QGIS? I prefer a robust method within ArcGIS.

Using a feature iterator Value variable in a SQL expression of select by attribute

$
0
0

I am using Iterate feature selection to select dealers one by one as input features to the Near tool. I’m using Select by Attributes to select sales points from that same dealer. How do I sync the Select by Attribute (dlr_no=%value%) with the current feature selection that is being selected by the iterator?

enter image description here

Creating Route events in ArcGIS

$
0
0

In ArcGIS I have a set of routes, some of whose direction I change using the flip edit so that they are in the direction I require. I am able to make route event layers. However, why is it that after creating a route event layer, these routes whose direction was changed are found to be with their original direction.

workflow process is as follows; add autocad drawing to arcMap,edit properties of polyline features by setting layer=tracks; assign road codes to the tracks and create routes using roadcode attribute; edit the direction of the routes created;export as a layer; make route event layer with the exported layer using linear referencing tool and an excel table with road code attribute.

I need to have route events with the direction after flipping. How do I do this?

How to calculate frontages of city parcel data in ArcMap 10.0?

$
0
0

I need to calculate the length of polygon frontages (along streets) from our city’s parcel (i.e. lot) data in order to do an analysis on lot frontages in various zoning districts. How can I do this?

Adding VBA code to ArcMap

$
0
0

I have a VBA code and I need to add it to ARCMap 10.2.2 but not sure how to do it I couldn’t find anything online.


ArcMap: Unknown Spatial Reference fix with GDAL/Python

$
0
0

I have a .tif file that I created with Python and when I open it in ArcMap it says it doesn’t have spatial reference information. Is there a way to set the spatial reference with GDAL if I have a .prj file? I have tried running this command through Python:

gdalwarp -t_srs ESRI::file.prj tmp.tif ouput.tif

Where -t_srs is the ‘target spatial reference set’, but it gives me the error: “Unable to compute a transformation between pixel/line and georeferenced coordinated for tmp.tif”

Is there an easy way to set the spatial reference of a .tif file with GDAL?

ArcMap 10.1 – Tools within Drawing toolbar are disabled/grayed out [closed]

$
0
0

I’m wanting to draw a graphic on the map but the option to select a graphic is disabled/grayed out.

White Pixel in Raster (CIR) arcmap 9.3

$
0
0

i have to analyse forest cir orthophotos. in high scale resolution, many white pixel appear instead of red ones.
i work with arcmap 9.3, win7 enter image description here

Can layers with different extents in arcmap 10 be made to line up?

$
0
0

I am currently trying to get some insect sampling coordinates that are represented by points to project on top of a polygon that shows all the different plots of land in a ranch. The coordinates for the points are in decimal degrees and were collected using iphones. Both layers have the same exact Projection and Geographic coordinate systems, but do have different extents. They also have the same false easting, false northing, central meridian and datum. Is there a method of getting the points to line up on the polygon by changing extents, or is there another method that I can use? here are the extents of both layers if it helps. Thanks in advance.

For the polygon:

top: 3050776.094191 m
left: 631422.082049 m
bottom: 3031869.963465 m
right: 644361.972775 m

The points:

top: 27.573800 m
left: 97.000000 m
bottom: 27.000000 m
right: 97.640800 m

Cutting rectangle set (not squares) into triangles using ArcGIS for Desktop?

$
0
0

I have some large features that I need to split into smaller pieces for terrain alignment through vertices in another program. I figured triangles would be the best solution.

So basically I want to turn this:

enter image description here

into this:

enter image description here

Sadly the latter image is a mockup. I had some success with the fishnet tool and intersecting to create rectangles, but I can’t get triangles out of it. Rotating the net doesn’t work because the rectangles aren’t square. Any ideas that don’t involve manual cutting?

Viewing all 248 articles
Browse latest View live