|
POST
|
Hi Brittany Burson , Good question and unfortunately I am not able to test this, since I don't have an Enterprise 10.6 environment. There are several things you can try. If you share the data and not the map, and create the map in AGOL, does the same error occur? If so the restriction is probably coming from the data source. When you collaborate using a copy of the data, the copy will reside in AGOL (as far as I understand) and you should be able to use the FeatureSetByName function.
... View more
07-09-2020
10:21 AM
|
0
|
0
|
1865
|
|
POST
|
Hi Heath Anderson , I just wanted to add that normally when the rolling sum does not have the number of records available (like for the first records) it would return NoData. In this case it might be correct since before the first record the number is probably 0. If this is not the case but you still need some value that could be compared to the other records, you could divide by the number of records that you have available and multiply by 7. It is just a thought, and it depends on the data and what it represents to determine if this is valid.
... View more
07-09-2020
10:13 AM
|
1
|
0
|
3284
|
|
POST
|
Hi heathmanderson , I haven't tested it, but could you try this? // define dates
var dateFormat = "MM/DD/Y"; // 12/31/2019
var dateTo = Text(Date($feature.ReportDate), dateFormat);
var dateFrom = Text(DateAdd($feature.ReportDate, -7, 'days'), dateFormat);
// define query and apply filter
var sql = "ReportDate BETWEEN date '" + dateFrom + "' and date '" + dateTo + "'";
var fs = Filter($layer, sql);
// summarize values in field Active for selected features
return Sum(fs, "Active");
... View more
07-08-2020
12:04 PM
|
1
|
3
|
3284
|
|
POST
|
Hi Benny Istanto , To be honest, I don't see any option in the "arcpy.RasterToNetCDF_md" tool to allow this. Perhaps using the "band_dimension" parameter in combination with the "fields_to_dimensions" parameter you could do something, but I am not sure.
... View more
07-06-2020
05:55 AM
|
0
|
0
|
1706
|
|
POST
|
Hi ryma aneliunas , You can create separate expressions for the latitude and longitude values: Latitude: function MetersToLat(my) {
// Converts XY point from Spherical Mercator EPSG:900913 to lat/lon in WGS84 Datum
// Source: http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/
var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lat = (my / originShift) * 180.0;
lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);
return lat;
}
var poly = Geometry($feature);
if (!IsEmpty(poly)) {
var pnt_centr = Centroid(poly);
return MetersToLat(pnt_centr.y);
} else {
return Null;
} Longitude: function MetersToLon(mx) {
// Converts XY point from Spherical Mercator EPSG:900913 to lat/lon in WGS84 Datum
// Source: http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/
var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lon = (mx / originShift) * 180.0;
return lon;
}
var poly = Geometry($feature);
if (!IsEmpty(poly)) {
var pnt_centr = Centroid(poly);
return MetersToLon(pnt_centr.x);
} else {
return Null;
}
... View more
07-03-2020
04:03 PM
|
2
|
1
|
4449
|
|
POST
|
Hi Zhan Shi , In short, yes you can have a list of layer names and loop through these names, access the layer in the map and use the intersect to see if the point hits any boundaries in that layer, use the count and return the layer name if any hits are found. What might be an issue is performance. It will take multiple requests to the service and depending the number of layers, number of features in each layer and complexity (number of vertices) of the polygons, this might not result in an acceptable performance for the end user. It is however possible and you can test to see if it performs. If you want some more detailed help, you could share the data to a group and invite me (xbakker.spx) and I will show you the Arcade expression that you could use.
... View more
07-03-2020
09:05 AM
|
0
|
0
|
1123
|
|
POST
|
Hi Ciaran Higgins , In that case it makes sense that UrlEncode is not available for you. Do you expect to update anytime soon? Version 10.8.1 is about to be released.
... View more
07-03-2020
08:37 AM
|
0
|
1
|
2169
|
|
POST
|
Hi Ciaran Higgins , I see... You are using portal, right? What version of Enterprise do you have? UrlEncode was introduced in Arcade version 1.7 which means that you need Enterprise / portal 10.7.1 to use it.
... View more
07-03-2020
05:57 AM
|
0
|
3
|
8803
|
|
POST
|
Hi deborah.hide.fls , I'm glad it works and my pleasure. If you have any follow-up question you can post them here and I will get a notification.
... View more
07-03-2020
05:54 AM
|
0
|
1
|
8089
|
|
POST
|
Hi Deborah Hide , With a couple of adjustments you get the result you are after: var blocks = Intersects(FeatureSetByName($datastore, "Blocks"), $feature);
var cnt = Count(blocks);
var intersectArea = 0;
if (cnt > 0) {
// we have overlapping blocks, loop through blocks
for (var block in blocks) {
// intersect with polygon, and add area to the total
intersectArea += Area(Intersection($feature, block), "hectare");
}
}
return Round(intersectArea, 2); Which will result in: Notice that I switched off the Union (a union requieres two or more geometries to be successful) since this would make the processing time larger. I recommend you not to use it unless your blocks are regions and have overlap. If this is not the case, you do not need it. You can also enhance the result by including more information, for instance the percentage of the area that has overlap with the blocks and perhaps information of the blocks that overlap. See below (I blurred parts of it since I don't know if it contains sensitive data): To do this, you would need the expression below: var blocks = Intersects(FeatureSetByName($datastore, "Blocks"), $feature);
var cnt = Count(blocks);
var intersectArea = 0;
if (cnt > 0) {
// we have overlapping blocks, loop through blocks
var blocknames = "Block names:";
for (var block in blocks) {
// intersect with polygon, and add area to the total
intersectArea += Area(Intersection($feature, block), "hectare");
blocknames += TextFormatting.NewLine + " - " + block.extent;
}
// calculate the percentage of overlap
var zoneArea = Area($feature, "hectare");
var percentage = Round(intersectArea * 100.0 / zoneArea, 1);
// format the resulting text
var result = cnt + " Building block(s) found:"
result += TextFormatting.NewLine + " - Test Area : " + Round(zoneArea, 2) + " ha.";
result += TextFormatting.NewLine + " - Overlap Area: " + Round(intersectArea, 2) + " ha.";
result += TextFormatting.NewLine + " - Percentage Overlap: " + percentage + "%";
result += TextFormatting.NewLine + blocknames;
return result;
} else {
return "No overlap with building blocks..."
}
... View more
07-02-2020
02:35 PM
|
2
|
3
|
8089
|
|
POST
|
Hi Ciaran Higgins , I'm glad it works now. Just to be on the safe side, it would be better not to use Replace, but to use the UrlEncode Arcade function. This will make all characters valid for use in a URL. To use your example text: UrlEncode("NWA1A BTCC C Diamond.Coolagh Road LM.Points.Coolagh Bolie Flow") Returns: NWA1A%20BTCC%20C%20Diamond.Coolagh%20Road%20LM.Points.Coolagh%20Bolie%20Flow So just use this: var link = 'http://telemweb/graph/' + UrlEncode($feature.FULLNAME) +'?Historic&applet'
... View more
07-02-2020
10:00 AM
|
1
|
5
|
8803
|
|
POST
|
Hi Deborah Hide , It is possible to determine the intersected area of a polygon with a layer of polygons. It would start with reading out the current feature (the survey area) and use the Intersects function to filter those land blocks that intersect with the survey area. If you have any results, you would loop through the land blocks and use the Intersection function to create a new geometry with the intersecting area. Then you would sum the areas and compare it to the area of the survey area to determine the percentage of survey area covered by land blocks. This is assuming the land block do not have overlap with other land blocks. If that would be the case, you would need to use the Union first on the land blocks that intersect with the survey area. If you are able to share the information (create a group, invite me using my ArcGIS Online user "xbakker.spx" and share the webmap and layers to that group), I would be able to help better. Please also have a look at this post where the FEMA map is used to determine percentage of overlap: https://community.esri.com/message/897153-re-arcade-expression-intersecting-feature-sets-with-overlappingsplit-attribute…
... View more
07-01-2020
10:56 AM
|
0
|
5
|
8089
|
|
POST
|
Hi Ciaran Higgins , You are correct to use the iif in order to return a string. The pop-up will interpret it as simple text or when it is a valid URL it will present the link with a text like "more information" that is clickable. Is it possible to share a valid example of a URL that will be return?
... View more
07-01-2020
10:38 AM
|
0
|
8
|
8803
|
|
POST
|
Hi Ciaran Higgins , When you return a string that represents a valid url it should be displayed as a link. I notice that you return this: 'url'+$feature.FULLNAME+'?anotherpieceoftext' Starting the url with a text "url" will not result in a valid url. What is the exact url you try to create?
... View more
07-01-2020
07:43 AM
|
0
|
0
|
8803
|
|
POST
|
Hi ASC_GIScoordinator , I just did a small test to return a html link (a href) from an Arcade expression in the pop-up and it did not work. I am pretty sure that when you configure that in ArcGIS Pro and publish it, it will not work.
... View more
07-01-2020
07:37 AM
|
1
|
0
|
9662
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|