|
POST
|
Ah, I think the da module only came in at 10.1 I think that the only way you will achieve this is to cycle through each point of the polylines to update. N
... View more
02-11-2014
08:12 PM
|
0
|
0
|
1715
|
|
POST
|
You can do this by manipulating the "SHAPE@XY" token as detailed on the ArcPy Café page. http://arcpy.wordpress.com/page/2/ Look down the page for "Shift Features". I used it on a quickly digitized polyline. I shifted the copy Polyline2. Then added in the line midpoint to show that the data is different. But why increment a geographic dataset by 360º. This just brings you back to where you started. Expect ArcMap to have some difficulty with geographic coords with Longs that are <-180 or >+180, ditto the Lats (-90 to +90). Cheers, Neil
... View more
02-11-2014
02:54 AM
|
0
|
0
|
1715
|
|
POST
|
You are looking at Arc Grid format rasters. Open ArcCatalog and navigate to the directory above where you are now. You cannot use the windows file explorer to "view" this sort of stuff.
... View more
02-10-2014
08:51 PM
|
0
|
0
|
1624
|
|
POST
|
If you use the pixel inspector (search in help, but its in the raster category in customize, commands), you can see that those dark pixels along the edge are not quite black (0, 0, 0). Without knowing how the image got like this, its very difficult to comment further. But I just clipped your image again, using a polygon graphic and data -> export. When I do it to jpeg, there are still some errant dark pixels outside of the area of the graphic. If I export to tiff however, it all looks good. I am using v10.2. Perhaps you should try some different image formats (tif, img, fgdb) and see which works best. Cheers and good luck, Neil
... View more
02-04-2014
09:15 PM
|
0
|
0
|
2459
|
|
POST
|
The output tiff / jpeg is a 3 band RGB image and has no specific coding for "no data". The best you can do is use the raster symbology page to set 0, 0, 0 to be transparent. Sadly, in my version of your image, this doesn't get rid of all the black edges. It might do on your original however. Cheers, Neil
... View more
02-02-2014
10:00 PM
|
0
|
0
|
2459
|
|
POST
|
You are passing a list object into arcpy.Point :
Point=arcpy.Point([row[1],row[3]])
Take out the extra [], try :
Point=arcpy.Point(row[1],row[3])
assuming of course that row[1] & row[3] are both numeric. Cheers, Neil
... View more
01-30-2014
10:11 PM
|
0
|
0
|
561
|
|
POST
|
Very cool Chris.
polyGeomDict = {r[0]:(r[1]) for r in arcpy.da.SearchCursor(polyFC, ["COUNTY_CD","SHAPE@"])}
Those nested thingys still give me the shakes, but I must try to use them more. And I presume (can't remember), that if the point is inside the correct poly, the distance returned = 0. If not the distance is to the nearest boundary. So if the purpose is to identify those points mis-coded, then a simple text field with "Inside" or "Outside" could also be added. Lets hope that Nina gets back to you and gives you a tick!!! Cheers, Neil
... View more
01-22-2014
09:01 PM
|
0
|
0
|
383
|
|
POST
|
Sorry, old workstation grid format (watch the oldies throw rocks at me....), should have picked up on that. But this spatial reference definition : Spatial reference Lambert Linear Unit Meter (1.000000) Angular Unit Degree (0.017453292519943299) False easting 0 False Northing 0 Central Meridian 200000 Latitude of origin 50000 Datum D_Sphere_ARC_INFO It seems, at least, that you are confusing the X/Y shifts (False Easting / Northing) with the central meridian, Lat of Origin. Those values for the Central Meridian should be a value of the longitude of the central meridian of the projection. Ditto the Lat of origin (usually 0 , the equator). But again the original description looks really odd, where are the standard parallels info. So until you get the source spatial reference definitions correct, you can't project this correctly. Here is what I get looking at a grid datasets in Catalog.
... View more
01-21-2014
09:00 AM
|
0
|
0
|
4148
|
|
POST
|
Chris, wow, that was a long thread... Ditto on the "hack-programmer" bit. I go back a long way from aml to avenue and now to python, but learning all the time. I must admit, all my geom manipulation stuff has been based on either GCS (decimal lat/long) or metric UTM, so I cannot comment on the feet story. But it does sound odd if feet or whatever would make a difference to the geom object. One of the things I have learned is that if you create a geom object from scratch, you must supply the spatial reference with it, otherwise (esp with GCS based coords) you get weird rounding effects. Other than that, I am really enthusiastic about the geometry object methods. And its very fast to do this sort of custom spatial analysis using dictionaries. Currently on v10.2 Cheers, Neil
... View more
01-21-2014
08:23 AM
|
0
|
0
|
2242
|
|
POST
|
Loading feature data (including the geometry object) into python dictionaries (or lists, whatever) does indeed work and is a great way to do highly flexible geometry manipulation between features classes. My logic would be something like this... Using da.SearchCursor get the points into a dictionary. Presumably each has some sort of point ID so this can become the key thus : {PntID : [PntZipCode, PntGeomObject]} The zip code polys, the Zip Code itself can be the key pointing to the PolyGeomObject : {ZipCode : PolyGeomObject} Then iterate through the PntID's, extract the PntZipCode, use this to find the record in the ZipCode Polys dict, then use the distanceTo geometry method to find the distance between them. Collect the distances into a list of PntIDs, Distance... Then use this to update the original Fc or a copy. Cheers, Neil
... View more
01-20-2014
11:28 PM
|
0
|
0
|
2242
|
|
POST
|
What format is your input, because this doesn't look like anything ArcGIS would put out : "COORDINATE REFERENCE TYPE Projected PROJECTION lambert GEOGRAPHIC COORDINATE REFERENCE GCS_Lambert COORDINATE REFERENCE DETAILS PROJECTED COORDINATE SYSTEM X ORIGIN -200 Y ORIGIN -5385200 XY SCALE 22517998136852.477 Z ORIGIN -100000 Z SCALE 10000 M ORIGIN -100000 M SCALE 10000" Possibly CAD or something... Neil
... View more
01-20-2014
09:49 PM
|
0
|
0
|
4149
|
|
POST
|
If you're looping through your rasters to be imported, you could change the name using python's "replace" like :
InRas = "NSS.HRPT.NK.D13172.S1035.E1048.B7854545.WI"
OutRas = InRas.replace(".","_")
print OutRas
NSS_HRPT_NK_D13172_S1035_E1048_B7854545_WI
Cheers, N
... View more
01-20-2014
09:27 PM
|
0
|
0
|
603
|
|
POST
|
Andrew, when you create the polygon object, be sure to specify the spatial reference of the object as well. like : polygeom = arcpy.Polygon(array, sr) Usually I get the sr object from Describe of the feature class I am adding to, or you can use the WKID of the coord sys. Cheers and good luck, Neil
... View more
01-20-2014
09:10 PM
|
0
|
0
|
1954
|
|
POST
|
Prabin, errr... If the original bil images are not georeferenced then no amount of assigning a coordinate system / projecting and what not is going to help. They are simply not georeferenced. You will have to go through a georeferencing step which involves picking control points from the image and assigning to these points their correct coordinates. But that is rather odd, where did this raster data come from? Neil
... View more
01-17-2014
04:39 AM
|
0
|
0
|
3580
|
|
POST
|
Andrew, perhaps its not finding a graphic element called "Statistics". Double check that. Cheers, N
... View more
01-17-2014
04:28 AM
|
0
|
0
|
1637
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-08-2015 11:28 PM | |
| 1 | 12-20-2013 08:59 PM | |
| 1 | 05-14-2014 10:38 PM | |
| 1 | 12-16-2013 09:05 PM | |
| 1 | 05-31-2019 02:50 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|