POST
|
Hi; I have 2 layers (tables) in SQL Server/ArcGIS Enterprise Geodatabase and I have to intersect those layers and retrieve the areas of the intersections. I am using a store procedure (SP) with geometrics functions in SQL Server. The layers in SQL Server are in Geographic Coordinate System GCS_ETRS_1989. But the results of the intersection and the areas returned by the SP are not correct. The result I get doing the intersect in ArcMap does not give the same results. The result in the SP is: The result in ArcMap is: I do not know if the problem is due to the Coordinate System. This is the code. Any ideas?. Thanks. USE [ENCE_SDE]goSET ansi_nulls ONgoSET quoted_identifier ONgoALTER PROCEDURE [ENCE_CARTO].[sp_XXX_getCatastroParcelaByCanton]
@codCantonOr NVARCHAR (40)
AS
BEGIN
DECLARE @geometryCantonOr GEOMETRY;
DECLARE @idMunicipio NVARCHAR(5);
DECLARE @clamonSap NVARCHAR(40);
DECLARE @geogrpah AS GEOGRAPHY;
DECLARE @cantonCortaParcial NVARCHAR(40);
DECLARE @geometryCantonCortaParcial GEOMETRY;
EXECUTE AS
caller
SET nocount ON;
SELECT @geometryCantonOr =[Shape],
@clamonSap=clamon_sap
FROM [XXX_SDE].[XXX_CARTO].[CANTONES]
WHERE canton_sap=@codCantonOr;
SELECT @cantonCortaParcial = canton_sap,
@geometryCantonCortaParcial=[Shape]
FROM xxx_sde.ence_carto.corta_parcial
WHERE canton_sap = @clamonSap;
SELECT @idMunicipio= municipio_id
FROM [XXX_SDE].[XXX_CARTO].[MONTES]
WHERE ut_monte_sap =@clamonSap;
IF (@cantonCortaParcial IS NULL)
BEGIN
SELECT objectid,
refcat,
(geography::STGeomFromWKB(
(
SELECT shape.Stasbinary()), 4326)).MakeValid().starea() AS suptotal,
(geography::stgeomfromwkb(
(
SELECT (@geometryCantonOr.STIntersection(shape)).STAsBinary()), 4326)).starea() AS supinter,
LEFT(refcat, 5) AS municipio
FROM [XXX_SDE].[XXX_CARTO].[CATASTRO_PARCELA] WITH(INDEX(s188_idx))
WHERE @geometryCantonOr.stintersects(shape)=1
AND LEFT(refcat, 2)=LEFT(@idMunicipio, 2)
END
ELSE
BEGIN
SELECT objectid,
refcat,
(geography::STGeomFromWKB(
(
SELECT shape.Stasbinary()), 4326)).MakeValid().starea() AS suptotal,
(geography::stgeomfromwkb(
(
SELECT (@geometryCantonOr.STIntersection(shape)).STAsBinary()), 4326)).starea() AS supinter,
LEFT(refcat, 5) AS municipio
FROM [XXX_SDE].[XXX_CARTO].[CATASTRO_PARCELA] WITH(INDEX(s188_idx))
WHERE @geometryCantonCortaParcial.stintersects(shape)=1
AND LEFT(refcat, 2)=LEFT(@idMunicipio, 2)
END
end
... View more
02-06-2020
02:37 AM
|
0
|
1
|
725
|
POST
|
Hello; I need to modify some of the operations (Aggregate Points, etc) of the WAB Analysis widget with the ArcGIS JS API (3.X). What I need is to filter the features of the layers involved in the analysis operations, and pass to the geoprocessing service only the filtered features. The widget uses geoprocessing service, for example: -https://analysis6.arcgis.com/arcgis/rest/services/tasks/GPServer/AggregatePoints -https://analysis6.arcgis.com/arcgis/rest/services/tasks/GPServer/XXXX -Etc But I don't see in the code (Widget.js) where the geoprocessing service is called, and how the parameters are passed to it. I see when geoprocessing service is called in the Network tab of the developer tools: The last line of code that runs before the geoprocessing service is called is this (I believe): But I do not see how I can modify the code to pass my own parameters. For example, like this: https://developers.arcgis.com/javascript/3/jssamples/gp_resultmapservice.html (Class: Geoprocessor) Any suggestions? Thanks, greetings.
... View more
01-23-2020
11:57 PM
|
0
|
0
|
288
|
POST
|
Thanks Joe; But I had already read the link. In it, there are no code to check if the users have reconciled and posted versions. I can not do the reconcile because there are conflict that the user has to resolve with ArcMap (not the python script). I need to verify if the users have reconciled and posted versions, in this case I have to compress and regenerate index database, If the users have not reconciled and posted versions, the script stop (no compress, no regenerate index). Regards.
... View more
01-21-2020
08:04 AM
|
0
|
1
|
933
|
POST
|
Thanks Joshua; When I said "consolidated" I mean that if the users have reconciled and posted their data in the default version of the geodatabase?. I need to compress all geodatabase. I can not compress the geodatabase if all users have not reconciled and posted their data in the default version of the geodatabase, because there are an esri recommendation about it: "To maintain good performance in a geodatabase containing versions, there are a few key administrative tasks that should be run regularly. A recommended workflow for administrators is to frequently reconcile and post, compress the geodatabase, then run the Analyze Datasets and Rebuild Indexes geoprocessing tools. This sort of routine maintenance can be set up to run nightly as a script or by building a model." Recommended version administration workflow—ArcGIS Help | ArcGIS Desktop I understand that it is better reconciled and posted before that do the database compress, etc Regards.
... View more
01-21-2020
06:47 AM
|
0
|
4
|
933
|
POST
|
Thanks Dan; I will try to do a query in the "sde.version" table like this: if status field contains 3355443X maybe the database is consolidated if status field does not contains 3355443X maybe the database is not consolidated Arcsde 10 - versions table, status 33554433
... View more
01-21-2020
06:31 AM
|
0
|
0
|
933
|
POST
|
Hello Dan; Thanks. I mean specific arcpy functions, I think. But I had already read the link. But in it, there are no code to check if the database is consolidated and my script code can not do the reconcile because there are conflict that the user has to resolve (not the python script). I need to do a compres an regenerate index database only if the users have consolidated the data in the enterprise database. Regards.
... View more
01-21-2020
04:53 AM
|
0
|
8
|
933
|
POST
|
Hi; In a python/arcpy script I have to do a compress database and a regenerate index. I don't have to do a reconcilied version. But previously I have to validate if users have reconcilied the data in the default version of the enterprise database. Is there any way to do this with ArcPy?. Maybe doing a query to the sde.version table or other table. But I do not how. Thanks. Greetings.
... View more
01-21-2020
02:01 AM
|
0
|
10
|
1302
|
POST
|
Hi; I need to create a widget in WAB to export a layer (Graphic Layer for example) to GeoJSON with ArcGIS API Javascript 3X. Besides using libraries like Terraforme, etc. I would like to see how is exported to geojson in the WAB "Select" and "Geoprocessing \ Profile" widgets or in the Robert Scheitlin Enhanced Search Widget (for example), but I've been searching in the javascript the code of this widgets but I can't find anything to do the export to GeoJSON. Do you know how this widgets export to GeoJSON. Thanks, greetings.
... View more
01-13-2020
09:29 AM
|
0
|
1
|
1072
|
POST
|
Hello; I am using esri request in a web application with VERSION 3.8 of the API ArcGIS Javascipt to add a shapefile (https://developers.arcgis.com/javascript/3/jssamples/portal_addshapefile.html) The application gives the following error: This is the Network tab in Chrome: This is my function: generateFeatureCollection: function (fileName) {
var name = fileName.split(".");
name = name[0].replace("c:\\fakepath\\", "");
var params = {
'name': name,
'targetSR': this.activeMainMap.spatialReference,
'maxRecordCount': 1000,
'enforceInputFileSizeLimit': true,
'enforceOutputJsonSizeLimit': true
}
var extent = scaleUtils.getExtentForScale(this.map, 40000);
var resolution = extent.getWidth() / this.map.width;
params.generalize = true;
params.maxAllowableOffset = resolution;
params.reducePrecision = true;
params.numberOfDigitsAfterDecimal = 0;
var myContent = {
'filetype': 'shapefile',
'publishParameters': JSON.stringify(params),
'f': 'json',
'callback.html': 'textarea'
};
var portalUrl= 'http://www.arcgis.com';
esriRequest({
url: portalUrl + '/sharing/rest/content/features/generate',
content: myContent,
form: dom.byId('uploadFormCargaRodales'),
handleAs: 'json',
load: lang.hitch(this, function (response) {
if (response.error) {
console.log("response.error: ", response.error)
this.errorHandler(response.error);
return;
}
var layerName = response.featureCollection.layers[0].layerDefinition.name;
this.addShapefileToMap(response.featureCollection);
}),
error: lang.hitch(this, this.errorHandler)
},
{usePost:true});
}, This is my html: <form enctype="multipart/form-data" method="post" id="uploadFormCargaRodales">
<input type="file" name="file" id="inFile" />
</form> The error occurs in esriRequest. I have read this but without results: https://community.esri.com/thread/213470-arcgis-rest-api-generate and this: https://stackoverflow.com/questions/23784920/im-getting-unexpectected-token-for-a-valid-json I've tried also with esri.request (v 3.8) but without results too. If you change 3.29 by 3.8 in this example https://developers.arcgis.com/javascript/3/jssamples/portal_addshapefile.html happen my error (unexpected token <) Any suggestions? Thank you very much, greetings.
... View more
10-07-2019
09:57 AM
|
0
|
0
|
545
|
DOC
|
Robert; I am using a custom theme. Not one of the themes of WAB. Thanks.
... View more
02-01-2019
01:10 AM
|
0
|
0
|
3675
|
DOC
|
Hello; I am using this widget, and I would like that when this widget is closed and later do a click in a feature, the popup of the webmap of Portal/AGOL is displayed. Is this possible? Best regards.
... View more
01-29-2019
09:07 AM
|
0
|
0
|
3675
|
POST
|
Hello; I have developed an add-in in Python for ArcGIS Pro (not with the SDK).
In ArcGIS Pro I see the file tbx, etc, but I do not know how to generate the esriAddinX file
to install the add-in on other machines.
I have been trying with the file makeaddin.py, with Python Add-In Wizard, but I think they are
only for ArcGIS Desktop.
I do not know if I have to use Visual Studio.
Any suggestions? Thanks, greetings.
... View more
08-29-2018
04:46 AM
|
0
|
0
|
412
|
POST
|
Hello; You can set the printPage property of the Directions class like this: printPage: "widgets/Directions/newPrintTemplate.html" GitHub - driskull/print-directions: Print Directions template for the ArcGIS Directions widget. Use this to customize th… Regards.
... View more
02-26-2018
07:58 AM
|
1
|
0
|
427
|
POST
|
I'm developing an application with WAB and the JS 3.22 API to calculate routes over a multimodal networks dataset. When I add barriers I find that several lines of network 1 of the network dataset (subway for example) has the same geometry that several lines in network 2 (bus for example). And when I add barriers in the coordinates of the lines with the same geometry, the barrier applies to both networks (subway and bus), and I need that the barrieres applies only to one network. I am adding the barriers in this way: var polylineJson = { "paths":[[[x1, y1], [x2, y2] ]], "spatialReference":{"wkid":this.config.spatialReference} }; var polyline = new Polyline(polylineJson); var myGraphic = new Graphic(polyline, null); myGraphic.setAttributes(…); routeParams.polylineBarriers.features.push(myGraphic); But I do not know how to indicate that the barrier affects only the network that I want. I don`t know if I have to change my JS code or the Network Dataset Does this problem have a solution? Thanks, greetings.
... View more
02-26-2018
07:43 AM
|
0
|
3
|
541
|
Title | Kudos | Posted |
---|---|---|
1 | 02-26-2018 07:58 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|