|
POST
|
Here is my script import arcpy ... from arcpy import env ... env.workspace = "C:\\Data" ... print 'Processing...' ... fc = "Updated_subset.dbf" ... cursor = arcpy.da.SearchCursor(fc, ["OID"]) ... for row in cursor: ... SQL_stat= "OID = "+ str(row[0]) ... fc2 = "airports_old.dbf" ... cursor2 = arcpy.da.SearchCursor(fc, ["STATE"], SQL_stat) ... for row2 in cursor2: ... UpdatedValue = row2[0] ... cursor3 = arcpy.da.UpdateCursor(fc2, ["STATE"],SQL_stat) ... for row3 in cursor3: ... row3[0] = UpdatedValue ... cursor3.updateRow(row3) ... del row ... del cursor ... del row2 ... del cursor2 ... del row3 ... del cursor3 ... ... print "Done" At the moment the script below the OID is coneverted to string SQL_stat= "OID = "+ str(row[0]) How do I rewrite the SQL stat if the OID Field is already a string, hence, don't need to convert to string Thanks for your help!
... View more
11-16-2017
12:55 AM
|
0
|
27
|
9855
|
|
POST
|
Hi All, This python code seems to work for updating two tables saw it online, with my low arcpy code skills This seem to update the two tables import arcpy ... from arcpy import env ... env.workspace = "C:\Users\L0505857\Data" ... print 'Processing...' ... fc = "Updated_subset.dbf" ... cursor = arcpy.da.SearchCursor(fc, ["RESID"]) ... for row in cursor: ... SQL_stat= "RESID = "+ str(row[0]) ... fc2 = "airports_old.dbf" ... cursor2 = arcpy.da.SearchCursor(fc, ["FIELD_NAME"], SQL_stat) ... for row2 in cursor2: ... UpdatedValue = row2[0] ... cursor3 = arcpy.da.UpdateCursor(fc2, ["FIELD_NAME"],SQL_stat) ... for row3 in cursor3: ... row3[0] = UpdatedValue ... cursor3.updateRow(row3) ... del row ... del cursor ... del row2 ... del cursor2 ... del row3 ... del cursor3 ... ... print "Done" thisSQL_stat line ---SQL_stat= "RESID = "+ str(row[0]) converts the unique ID field "RESID Field" to string. How do I remove the str for a another table in which the RESID field is already a string and not an interger field? SQL_stat= "RESID = "+ (row[0]) tried the line above without the str, I m getting errors. Thanks for your help
... View more
11-15-2017
09:18 AM
|
1
|
5
|
4750
|
|
POST
|
Hi All, could anyone please suggest an automated of doing my task below; We have a data structured schema in a geo-database which is currently empty. There is a third party data which needs to be loaded in our structured geodatabse. For data migration to be third party successful data structure needs to fits to new data structure. I would have thought the way to approach this is to export third party geodatabase xml schema how do I manipulate the xml schema to fit to our own schema.? is there an automated process of doing this? Thanks for your help!
... View more
09-06-2017
08:01 AM
|
0
|
4
|
1335
|
|
POST
|
Thanks Robert Scheitlin you have answered my question. Please take a look at my question use popup template in searchwidget geocoder the code is a geocoding service, you click anywhere in a map it displays addresses + xy coordinates, what I want to get to is to get the xy coordinates to be displayed as a table just like my other code you helpled with. Thank you!
... View more
08-23-2017
03:51 AM
|
0
|
0
|
773
|
|
POST
|
Hi Robert, it does not show any error, it just comes up with a blank mapview window when opened with IE
... View more
08-22-2017
03:08 AM
|
0
|
4
|
773
|
|
POST
|
Hi Robert, The return.html was my test.html. I have made the changes to http, it works using google chrome and edge, firfox. but can't get it to work using IE(internet explorer.) this has always been the issue, I was hoping to get to resolve the IE issue, not able to view Mapview in IE except from google chrome, Any help please thank you
... View more
08-21-2017
01:28 PM
|
0
|
6
|
1848
|
|
POST
|
I did made the changes to my dojo, changed it to my machine name; baseUrl:"https://PC70724/arcgis_js_api/library/4.4/dojo" and then used the url below to open return html https://pc70724/arcgis_js_v44_api/RETURN.html but still unable to
... View more
08-21-2017
07:17 AM
|
0
|
8
|
1848
|
|
POST
|
Hi Robert Scheitlin, Did try it but not working, don't know what I' m doing wrong; with the dojo.js, this is how I have made the changes as advised baseUrl:"https://www.example.com/arcgis_js_api/library/4.4/dojo" should I change the test.html to example.html? could this be the issue? Thanks for your help!
... View more
08-21-2017
01:53 AM
|
0
|
11
|
1848
|
|
POST
|
Hi Robert Scheitlin, so should I use this url; http://localhost/arcgis_js_v44_api/test.html? Thanks for your help!
... View more
08-18-2017
02:43 AM
|
0
|
13
|
1848
|
|
POST
|
I have followed the steps on how to install and test your API on windows see instructions below Install the Build Open C:\Inetpub\wwwroot\arcgis_js_api\library\4.4\dojo\dojo.js in a text editor and search for the text [HOSTNAME_AND_PATH_TO_JSAPI] , and replace this text with https://www.example.com/arcgis_js_api/library/4.4/ . Test the Install Now you should be able to access the ArcGIS JavaScript library from your web server using the following URL: <script src="https://www.example.com/arcgis_js_api/library/4.4/dojo/dojo.js"></script> Test your install. You can use the following test code to validate your JSAPI library install. -----------------------------------------------------------------------------
This is my local drive where I have installed it;
C:\inetpub\wwwroot\arcgis_js_v44_api . Also made the necessary changes to dojo.js as advised.
The next stage was to use a test.html to see if it works.
Where I ‘m a bit confused now how do I point the URL to my test.html to be able to view in internet explorer.
I have open the test.html using C:\inetpub\wwwroot\arcgis_js_v44_api\test.html, and isn’t right.
... View more
08-17-2017
01:52 AM
|
0
|
15
|
3266
|
|
POST
|
Hi All, I do have a popup template that works in my search sources, however, would like to use the same template in the search default source, not able to so far. I want to be able to have the same popup template in this code at the moment, its using a default template which works, but I want like to have a new popup template like the other sources. At the moment not able to any help please. The function is to click on anywhere in the mapdiv and it returns addresses and x y coordinates as a popup function showPopup(address, pt) { view.popup.open({ title: "Find Address Result", content: address + "<br><br> Lat: " + Math.round(pt.latitude * 100000)/100000 + " Lon: " + Math.round(pt.longitude * 100000)/100000, location: pt, }); var search = new Search({ view: view, activeSourceIndex:-1 }); search.defaultSource.withinViewEnabled = false; // Limit search to visible map area only view.ui.add(search, "top-right"); // Add to the map // Add the trailheads as a search source search.sources.push({ featureLayer: trailsLayer, searchFields: ["UPRN", "ADDRESS" ], displayField: "ADDRESS", exactMatch: false, outFields: ["*"], resultGraphicEnabled: true, name: "Chelmsford Addresses", placeholder: "example: CM2 0HU", popupTemplate: { // autocasts as new popupTemplate() title: "Chelmsford Addresses", content: [{ type: "fields", fieldInfos: [{ fieldName: "UPRN" }, { fieldName: "ADDRESS", }, { fieldName: "LAT", }, { fieldName: "LONG" }] }], actions: [{ id: "find-brewery", image: "beer.png", title: "Get XY Cordinates" }] } }); search.sources.push({ featureLayer: trailsLayer2, searchFields: [ "LOCATION" ], displayField: "LOCATION", exactMatch: false, outFields: ["*"], resultGraphicEnabled: true, name: "Chelmsford Car Parks", placeholder: "example: CM2 0HU", popupTemplate: { // autocasts as new popupTemplate() // title: "Car Park </br>Location: {LOCATION}", title: "Chelmsford CarParks", content: [{ type: "fields", fieldInfos: [{ fieldName: "LOCATION" }] }], actions: [{ id: "find-brewery", image: "beer.png", title: "Get xy cordinates" }] //overwriteActions: true } }); search.sources.push({ featureLayer: trailsLayer3, searchFields: ["WARD_N" ], displayField: "WARD_N", exactMatch: false, outFields: ["*"], resultGraphicEnabled: true, name: "Wards", placeholder: "example: CM2 0HU", popupTemplate: { // autocasts as new popupTemplate() title: "Post Code: {Postcode}</br>UPRN: {UPRN}</br>ADDRESS: {ADDRESS}", overwriteActions: true } }); // Find address function showPopup(address, pt) { view.popup.open({ title: "Find Address Result", content: address + "<br><br> Lat: " + Math.round(pt.latitude * 100000)/100000 + " Lon: " + Math.round(pt.longitude * 100000)/100000, location: pt, actions: [{ id: "find-brewery", image: "beer.png", title: "Get XY Cordinates" }] }); } view.on("click", function(evt){ search.clear(); view.popup.clear(); var locatorSource = search.defaultSource; locatorSource.locator.locationToAddress(evt.mapPoint) .then(function(response) { var address = response.address.Match_addr; // Show the address found showPopup(address, evt.mapPoint); }, function(err) { // Show no address found showPopup("No address found for this location.", evt.mapPoint); }); }); });
... View more
08-16-2017
02:53 AM
|
0
|
0
|
888
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-21-2017 05:23 AM | |
| 1 | 11-15-2017 09:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|