POST
|
I’m writing on an iPad so may have typos.p or bad spacing. A few things. The first argument for the command is the input feature, not a field name. The command will ADD new fields based on the second argument arcpy.AddGeometryAttributes_management(out_fc, "CENTROID_INSIDE", "", "", latLonRef)
You may want to copy you few records from the feature class to a temp file geodatabase (fgdb) and test that first. SDE may add some restrictions for other reasons (permissions, locks). Get it worked in the fgdb so you can see the logic, then try it on a copy in sde. I think once you see how it adds the field it will make more sense.
... View more
04-20-2018
09:48 AM
|
2
|
2
|
1933
|
POST
|
In you step 3a and 3b you are adding the Latitude and Longitude fields, so you should not need to add them again in lines 57/58. But I also do not think you need to have a cursor to get this info sine it looks like you out_fc and therefore your featureClassesList is only one feature class. Is that correct? Or do you plan to have a list of FC to process at come point? if you will eventually have a list of fc that you will input, then don't add them in 3a and 3b....howevere, you may not need to add them at all.. If you use the tool Add XY Coordinates—Help | ArcGIS for Desktop Jake recommended, that "Adds the fields POINT_X and POINT_Y to the point input features and calculates their values" But you said your features are polygons. I think a better option for you if you are looking for the centroids is to use this tool Add Geometry Attributes—Help | ArcGIS Desktop which Adds new attribute fields to the input features representing the spatial or geometric characteristics and location of each feature, such as length or area and x-, y-, z-, and m-coordinates. Syntax:
AddGeometryAttributes_management (Input_Features, Geometry_Properties, {Length_Unit}, {Area_Unit}, {Coordinate_System}) There is a long list of "Geometry_Properties" types that you can request. These is no need to "calculate" these fields if there is a tools that will do it for you, unless there is a reason (school assignment or if input to another tool step that will need this). One comment about the AddGeometryAttibutes tool that I ran into in 10.2.2, if you cal a projected coord to geography and then back, there may be some small round off error. Not significant, but for our Albers to geometry to Albers (I won't go into why I had to do this), there was a slight different. Nothing that was measurable for what we were doing (small planes). Hope this helps.
... View more
04-19-2018
04:29 PM
|
2
|
6
|
10695
|
POST
|
Levi Roberts I updated my thread Solution: Print GP service not printing cached basemap (AGS 10.5.1) with the solution to my problem. In short, we have cached services that for a variety of reasons, the actual published mxd no longer matches the cache. This does not cause any issues with displaying. However, simply put, the default in 10.5.1 is to have printing go back to the mxd to recreate the basemap on-the-fly instead of reading from the cache. The default in 10.2.2 was to always read from the cache. The checkbox that was causing all this confusion is in the services: Service Properties (Service Editor) -> Capabilities -> Mapping -> "Allow per request modification of layer order and symbology" in 10.2.x this was UNCHECKED by default. in 10.5.1 (unfederated) this is CHECKED by default. Note: Federated AGS may have it unchecked by default. This was not verified (since it was not my setup), but was the initial setup the tech was using. She was not able to reproduce the issue on that setup, but this was not retested to know for sure. --> SOLUTION <-- To force the print geoprocessing service to read from the cache and not the source, make sure to uncheck the box. for more details, check out the other thread. This may not be the same as your issue, but might be worth a look.
... View more
04-19-2018
03:43 PM
|
0
|
0
|
1630
|
POST
|
After working with very patient and thorough tech support staff (Jordan), she was finally able to figure out the difference between the DEFAULT 10.2.x and DEFAULT 10.5.1 services. We did not test the versions in between, so I do not know when this default behavior came into play. For our situation, this difference only caused an issue on cached services where 1) the original source layers were not readily available any more, and/or 2) layers that where included in the cache were removed and/or even just unchecked in the TOC. The actual property is not one I would have thought controlled whether PRINTING came from the cache vs. the mxd source layers. However, I can see the controlling the drawing/display (I believe this is what allows a user to change the rendering on-the-fly) The checkbox that was causing all this confusion is in the services: Service Properties (Service Editor) -> Capabilities -> Mapping -> "Allow per request modification of layer order and symbology" in 10.2.x this was UNCHECKED by default. in 10.5.1 (unfederated) this is CHECKED by default. Note: Federated AGS may have it unchecked by default. This was not verified (since it was not my setup), but was the initial setup the tech was using. She was not able to reproduce the issue on that setup, but this was not retested to know for sure. --> SOLUTION <-- To force the print geoprocessing service to read from the cache and not the source, make sure to uncheck the box. There are times you do want it checked as mentioned, such as if you need to give the users' a bit more rendering control. So, I can understand while this may have been changed to being checked by default (i.e. an as designed feature). In our case, there are two main reasons we would want it unchecked: Cached services where the source data is not longer available, or access to the data is not practical (i.e. network too slow. Cached service where we purposely removed or unchecked layers to prevent Identify from returning info. For example, we may have topo or imagery cache data, but when queried, we want to only return information from a polygon layer with the quadrangle info (or maybe parcel info) so we removed the imagery. And in my opinion, most cached raster basemaps used for public web maps we would want to use the cache only. BTW - the only variable that was making this show up (because of the default) was the AGS version (10.2.x vs 10.5.1). It did not matter whether we used the AGS default print service, a custom print service, the AGOL print service, the print service rest endpoint to export a map (with the json input), or a different version's print service. All those acted the same given the cached 10.5.1 service. Also, the results were the same using the REST endpoint tools vs. using a JavaScript api app (WAB or api only). So, that little box being checked, and the fact the published mxd did not match the cache exactly anymore...that was the cause. I hope this prevents frustration and wasted time for others running into this in the future.
... View more
04-19-2018
03:35 PM
|
3
|
3
|
3140
|
POST
|
I agree with Jake that they probasbly weren't all pushed to the DEFAULT. Before we ever delete a child version (or compress for that matter), we run a few queries to make sure things are pointing to the same version. We also use the GDBT(ools) that is old, and will not install without messing with things a bit, but it can give you a nice graphic. For our SQL sde, the commands I run using Microsoft SQL Server Management Studio (SSMS) before and after compress: use <our_sde_database>
select name, owner, version_id, state_id, parent_name, parent_owner from [<our_sde_database>].[dbo].[SDE_versions]
select * from [<our_sde_database>].[dbo].[SDE_versions]
select * from [<our_sde_database>].[dbo].[SDE_states] order by state_id
select * from [<our_sde_database>].[dbo].[sde_state_lineages] order by lineage_name, lineage_id I do it before the compress just to see a count of the changes, etc. I do it after to make sure the state_id is the same. I do not delete a good Child unless the state_id is the same....and preferably zero. I would also do a compress after deleting the child...which should put you at zero if you weren't already.
... View more
04-19-2018
02:06 PM
|
3
|
0
|
729
|
POST
|
That might be too busy of a map to do anything automated, but you may want to look at some suggested on youtube How to convert scanned image to shapefile in Arcgis - YouTube or stackexchange. grass - Converting a .jpg map into a shapefile - Geographic Information Systems Stack Exchange Basically if you can somehow isolate the layers color you might be able to automate it. Have you checked to see if the data layer you are looking for is available from the source of the map? Might be worth checking into before trying to recreate it.
... View more
04-18-2018
06:41 PM
|
1
|
0
|
1755
|
BLOG
|
Hi Hurmain Ariffin, I'm glad yo find it useful. However, I don't think I ever finished with all the raster types, since I was mainly interested in seeing what was inside my FGDBs and coverages. However, it may be that the broken link tools lists those. I haven't worked on this for a while but hope to get back to see if I can add features (but probably not until later this year, i.e. Fall/Winter 2018). I will post if/when I get a new share-able version. Feel free to unzip the addin and modify the .py files. I hadn't run the version installed on my machine for a while so I am doing that now. If I find that id does those raster files, I'll send you a copy (I received your direct email). Our IT wiped out my all my current development a few months ago and I'm still trying to rebuild the priority scripts from my deployed addins. Looking on the bright side, if there is one, at least I had those. Lesson #1 for me....back everything up to a safe location that they won't delete.
... View more
04-15-2018
01:01 PM
|
0
|
0
|
3885
|
POST
|
Typically, I do not include the items like. in_features=. Just the value in the quotes. also, to check the syntax they are asking for, do it onc3 with the tool to make sure it works. Then you can grab the python snippet from the Results tab (turn on from the geo processing tool menu) im also tagging the https://community.esri.com/community/developers/gis-developers/python?sr=search&searchId=4394990f-da26-43b4-b513-ed00428ce8c1&searchIndex=0 space, since that may get you more views than the snippet page. sorry for typos...using an iPad
... View more
04-10-2018
06:22 PM
|
1
|
0
|
499
|
POST
|
Joe, can you find or install another (temp) SQL instance and restore it there. Then copy the data to where you need it? I am not an expert, but from everything I have every seen re the SDE restores, it must be to the same name to work.
... View more
04-10-2018
05:58 PM
|
0
|
0
|
1728
|
POST
|
esrimohan As mentioned above, I am having general issues with my cached basemaps not printing (10.5.1 in my case....my 10.2.2 serevice print just fine). I am working with tech support and have found a few things. Just in case these help you at all. FYI - we have several basemaps that we cache, and then turn off the layers in the mxd since the cache is what we want to use. So, check these things... - Make sure all the layers in the mxd for your cache map service turned on (checked). - Make sure all the datasources for your cached service still available - if you have a mix of raster and vector data in the cached service, make sure they are all using the same spatial reference. As mentioned, our 10.2.2 services work fine. Some of our cached services no longer have access to the source, which is ok since we just need the cache. We also have our services in the same SR as the raster layer, but had a few vector layers that projected on the fly. Again, it didn't matter in 10.2.2 since it would print from the cache. Now it seems that the print itself is trying to be dynamic. I'm hoping they will have a workaround to force the print from the cache. I hope to know more in a few days. This is all independent of the actual ArcGIS Print Service used (the out-of-the-box or custom, or the version), and independent of the API used. That is, we tested using the REST endpoint to take any API like JavaScript out of the equation. It also is independent of external vs internal-only, web-adaptor or not, etc. It appears to be the way the services and their caches are dealing with printing. II'm not sure if this is relevant to your situation, but wanted to pass this along. Once I have a resolution, I will post on the thread link I mentioned above.
... View more
04-10-2018
05:45 PM
|
2
|
2
|
738
|
POST
|
A clip from the page Dan linked to (bold added) ArcGIS Desktop (featuring ArcGIS Pro) allows you to analyze your data and author geographic knowledge to examine relationships, test predictions, and ultimately make better decisions. ArcGIS Desktop is available in three license levels: Basic, Standard, or Advanced. These license levels share the same core applications, user interface, and development environment. Each license level provides additional GIS functionality as you move from Basic to Standard to Advanced. ArcGIS Desktop includes: ArcGIS Pro ArcMap, ArcCatalog ArcGIS Online Level 2 Named User account and 100 Service Credits So what that means is, yes,you get the same products, but if you buy the STANDARD you would get the equivalent STANDARD tools. There are somethings that you can only do with advanced, so it just depends on if you need those tools or not. In their short list "...advanced analysis, high-end cartography, and extensive database management.". But to know for sure, if you look at the help docs for the tools you would normally use, at the bottom of the help page they typically list the level that you would need.
... View more
04-10-2018
05:17 PM
|
1
|
0
|
384
|
POST
|
I would follow what Robert says. As mentioned, it's been a while since I messed with it. I need to update my other page to reflect the new instructions. I think the confusion came when they added 3D.
... View more
04-09-2018
09:14 AM
|
0
|
0
|
364
|
BLOG
|
yes. this is what mine looks like under the widgets folder... At least that is what I had done....but again, I have't used it for a while. Did you check out the link in that step? https://community.esri.com/thread/203359-is-there-a-problem-with-wab-25-and-locallayer-25-i-cant-seem-to-get-the-locallayer-widget-to-show-up That may help more.
... View more
04-05-2018
02:59 PM
|
0
|
0
|
2380
|
BLOG
|
I think I was missing the word "NOT" so I added that. It's been a while since I looked at all this, but if I remember correctly, its' just to make sure when you unzip it to a folder, lets say c:\temp that you cont get c:\temp\LocalLayer\LocalLayer\<other stuff> Sometimes the zip or how up unzip the zip will "double-up" the folder name. Other sime, you may get a _master appended to the folder. Those are the things you need to watch for. I would not mess with and of the files under the 2D/3D folders unless modifying them intentionally.
... View more
04-05-2018
02:39 PM
|
0
|
0
|
2380
|
POST
|
I haven't tested on 10.6, so that might be the issue. But you can try to unzip the .addin and go directly to the toolbox. Right-click on the tool and Source. See if it can find the .py script for the tool. You may need to go up a folder to find the scripts folder. I know I have had some issues with 10.5.1 with the "store relative path" for the script doing some weird stuff (trying to look on the "C$" share) when upgrading to newer version. It was developed mainly on 10.2.x. The only other thing might be if you have spaces in the path names. I can't remember if I handle things for that.
... View more
04-05-2018
01:54 PM
|
1
|
0
|
1021
|
Title | Kudos | Posted |
---|---|---|
1 | 11-02-2017 09:00 AM | |
1 | 11-04-2016 02:11 PM | |
1 | 07-29-2015 06:40 PM | |
1 | 03-28-2016 08:24 AM | |
1 | 08-07-2017 08:13 AM |
Online Status |
Offline
|
Date Last Visited |
02-24-2023
01:13 AM
|