POST
|
I hadn't tested using the Geoprocessing > Environment > Output Coordinates settings previously, However I can confirm that the GPX to Feature tool does seem to ignore the setting: In this test you can see that the output should have been GCS_GDA_1994 but the feature class was created in GCS_WGS_1984. Maybe someone from ESRI can comment on this? - Melita Kennedy
... View more
06-29-2015
11:35 PM
|
1
|
2
|
1389
|
POST
|
Is there a help reference for how to make a parameter only appear when it is required? Or should I just make my transformation parameter an optional parameter that is always present and then only add an error message when the input/output require it? You should be able to use the Enabled property to do this (see: IGPParameter3).
... View more
06-29-2015
05:11 PM
|
1
|
0
|
678
|
POST
|
However, since the geographic transformation list presented in the environment settings contains so many irrelevant transformations, should I instead add an optional parameter to the tool interface where the user would choose a transformation from a narrower list of transformations that fit the input and output spatial references? This would be a good idea as the large geotransformation list can be confusing to users. The following code should get you started. Please note that this is taken from an old VB.Net project and may need to be updated. The code was used to locate geotransformations between WGS84 and any other datum. 'Create WGS84 spatial reference
Dim SRF As ISpatialReferenceFactory2 = Nothing
Dim factoryType As Type = Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment")
SRF = CType(Activator.CreateInstance(factoryType), ISpatialReferenceFactory2)
Dim WGS84 As IGeographicCoordinateSystem = SRF.CreateGeographicCoordinateSystem(esriSRGeoCSType.esriSRGeoCS_WGS1984)
'Search all GeoTransformations for matches
Dim _GTList As New List(Of IGeoTransformation) 'List of ArcGIS Transformations
Dim GTSet As ESRI.ArcGIS.esriSystem.ISet = Nothing
Dim GT As IGeoTransformation
Dim SR1 As ISpatialReference = Nothing
Dim SR2 As ISpatialReference = Nothing
Dim ht As New Hashtable ' used to filter duplicate items
GTSet = SRF.CreatePredefinedGeographicTransformations
For i As Integer = 0 To GTSet.Count - 1
GT = GTSet.Next()
GT.GetSpatialReferences(SR1, SR2)
If (SR1.FactoryCode = Me.OtherGCS.FactoryCode) And (SR2.FactoryCode = WGS84.FactoryCode) Then
If ht.ContainsKey(GT.Name) = False Then
_GTList.Add(GT)
ht.Add(GT.Name, GT.Name)
End If
End If
Next
... View more
06-29-2015
05:10 PM
|
1
|
0
|
678
|
POST
|
Assuming I figure out how to control the logic of choosing the spatial reference the code will use for the buffering, I was thinking of using the IGeometry2.ProjectEx method to actually do the projection of either the output polygon or the input polyline when that step is necessary. I would like to use that method to handle densification of the geometry. Does that sound like the approach I should take? The only other option would be to project the entire feature class to a temporary one for use in analysis but I don't think you get the densification option if you do it this way.
... View more
06-29-2015
05:08 PM
|
1
|
0
|
678
|
POST
|
Should I alert the user that they cannot make the input and output both use a GCS by adding an error message on the output feature class in the UpdateMessages portion of the tool when I detect that both the input and output will use a GCS? Yes, at the very least you should alert the user. An ideal solution would be to limit the output spatial reference selection options to only include projected coordinate systems.
... View more
06-29-2015
05:07 PM
|
1
|
0
|
678
|
POST
|
Firstly, I am splitting the questions out into individual responses so that any subsequent comments can target a single issue. The output spatial reference will be the same as the input spatial reference except when the user either chooses an output Feature Dataset with a different spatial reference from the input or chooses a work space that is not a Feature Dataset and sets the Output Coordinate System of the geoprocessing environment settings to a different spatial reference from the input. Do these behaviors sound like they follow the common geoprocessing tool behaviors that users expect in Esri's geoprocessing tools, or have I overlooked something? As far as spatial references go this seems to be consistent with the way that the Esri geoprocessing tools work. When creating a feature class inside a Feature Dataset you must use the spatial reference of the feature dataset. In ArcObjects you will get an error if you attempt to create a feature class inside a Feature Dataset and the coordinate systems don't match.
... View more
06-29-2015
05:06 PM
|
1
|
4
|
1389
|
POST
|
You can project the point using a GeometryService. Note that you will need to convert your coordinates to decimal degrees before projecting them. There is also a good sample that shows how to do this: var inSR = new esri.SpatialReference({
wkid: incoord
});
var outSR = new esri.SpatialReference({
wkid: outcoord
});
var geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
var inputpoint = new esri.geometry.Point(inlon, inlat, inSR);
var PrjParams = new esri.tasks.ProjectParameters();
PrjParams.geometries = [inputpoint];
PrjParams.outSR = outSR;
if (datumtrans != 'Default') {
PrjParams.transformation = {
wkid: parseInt(datumtrans, 10)
};
}
geometryService.project(PrjParams, function (outputpoint) {
console.log('Conversion completed. Input SR: ' + incoord + '. Output SR: ' + outcoord + '. Datum Transformation: ' + datumtrans + '.');
dojo.byId("outLat").value = outputpoint[0].y;
dojo.byId("outLon").value = outputpoint[0].x;
});
... View more
06-24-2015
12:54 AM
|
1
|
0
|
687
|
POST
|
You could use client side sorting for this - see this quick demo I put together: QueryTask - client side sorting Basically, you just use the array.sort method with an anonymous function: results.features.sort(function(a, b) {
// return a.attributes.POP2007 - b.attributes.POP2007; // ascending
return b.attributes.POP2007 - a.attributes.POP2007; // descending
}); In your case replace the POP2007 field name with COD to sort the features.
... View more
06-23-2015
05:19 PM
|
1
|
0
|
1370
|
POST
|
I haven't used the Qt SDK but in the API the TextSymbol class has a SetText method that should update the text value. The text property on the TextSymbol class only appears to return the current value.
... View more
06-23-2015
03:40 PM
|
0
|
0
|
556
|
POST
|
Try this link: Download data for the whole world | Global Administrative Areas
... View more
06-19-2015
12:55 AM
|
2
|
0
|
1872
|
POST
|
The arcpy.mapping module does not seem to expose this. If you check the Layer properties the original name is shown (even after renaming it in the ToC): However the documentation for the arcpy.mapping Layer class shows no property that can be used to access this value unless you are using WMS service layers. serviceProperties (Read Only) Keys for a web service dictionary ServiceType —Property displaying the type of service. These include ImageServer, IMS, MapServer, TiledInternetLayer, WMS, and WCS. URL —Property displaying the URL to the service. If the connection to ArcGIS for Server is through a local area network (LAN), this value will be null. Server —Property displaying the server name. If the connection to ArcGIS for Server is through the Internet (HTTP), this value will be null. UserName —Property displaying the user name used to access a secured service. If the service is not password protected, this property will be null. ServiceName —IMS service layers only. Property displays the name of the IMS service. WMSName —WMS service layers only. Property displays the text string for the WMS service used for machine-to-machine communication. WMSTitle —WMS service layers only. Property displays the description title string for the WMS service. Name —WMS service layers only. Property displays the text string for the WMS layer used for machine-to-machine communication. Title —WMS service layers only. Property displays the description title string for the WMS layer. Not sure if you can do this without heading down the ArcObjects path.
... View more
06-17-2015
08:40 PM
|
1
|
1
|
547
|
POST
|
If you are referring to the ESRI JS API 3.11: To download and install the ArcGIS API for JavaScript and SDK navigate to the ArcGIS API for JavaScript download page and log-in with your Esri global account. see this page: Get the ArcGIS API for JavaScript | Guide | ArcGIS API for JavaScript
... View more
06-16-2015
02:04 AM
|
0
|
0
|
734
|
POST
|
If I test this in Chrome and IE the layers-add-result event always fires, even when there is a bad URL. I have an example here: Simple Map The only change to your code is to see if there was an error loading the layer (and the invalid URL for the second layer): map.on("layers-add-result", function(e){
console.log("Layers have been loaded:");
for (var i = 0; i < e.layers.length; i++)
{
var result = (e.layers.error == undefined) ? "OK" : e.layers.error.message;
console.log(" - " + e.layers.layer.id + ": " + result);
}
}); The console output shows:
... View more
06-15-2015
07:06 PM
|
0
|
1
|
831
|
POST
|
This can be a common issue with text fields. You could possibly get around it using a domain based field if the number of options is not excessive.
... View more
06-15-2015
05:24 PM
|
0
|
0
|
654
|
Title | Kudos | Posted |
---|---|---|
1 | 10-07-2014 06:13 PM | |
1 | 08-25-2015 02:04 AM | |
1 | 10-07-2014 03:54 PM | |
1 | 06-29-2015 05:11 PM | |
1 | 02-17-2015 12:01 PM |
Online Status |
Offline
|
Date Last Visited |
07-21-2021
06:32 PM
|