|
POST
|
Been stuck on this for a while this afternoon. I have been writing a script tool which loads some data from a table in a db. I needed to then set the spatial reference of the coordinates. So, in my script I had : SR = arcpy.GetParameterAsText(1) And in the tool properties, this is set to a Coordinate System data type. So you get the nice pull down list of the available coordinate systems. However, this returns a text representation of the prj, not a spatial reference object. Then I tried to do this : SR = arcpy.SpatialReference(arcpy.GetParameterAsText(1)) But you get an error because SR objects can only be created using : 1. Get them from a describe object 2. The WKID of the SR 3. A path to a projection file. You cannot use a text string. The answer turned out to be : SRtxt = arcpy.GetParameterAsText(1) SR = arcpy.SpatialReference() # an empty spatial reference object SR.loadFromString(SRtxt) Phew.... Now on with the rest of it....
... View more
03-10-2015
07:00 AM
|
4
|
13
|
10714
|
|
POST
|
There may be something wrong with the geometry of this one feature. Run Check Geometry or Repair Geometry on your polygons.
... View more
03-09-2015
11:52 PM
|
0
|
1
|
1786
|
|
POST
|
Heh, Dan's already got about 21 zillion points and is on level 42. I think I was the one (several times) to point out that a sr was essential when creatring geometries, especially when they are in a GCS. This advice I gained many moons ago from one of the kindly esri folk.
... View more
03-09-2015
06:23 AM
|
0
|
1
|
3003
|
|
POST
|
Are you talking about creating "filled polygon contours" from the raster surface? Steve at esri has created some spatial analyst extension tools, one of which does this. Will try to find the link....
... View more
03-05-2015
11:48 PM
|
0
|
0
|
1990
|
|
POST
|
Aren't you being a little unfair Dan? The geom1.equals(geom2) is an arcpy geometry method, and the help under arcpy Point clearly states that this is a 2D comparison only. Whereas "==" is a python equivalence test. They do different things.
... View more
03-03-2015
05:14 AM
|
2
|
3
|
3256
|
|
POST
|
All I did was select the Asia albers in PCS/Continental/Asia, then copy and modify it. Changed the central meridian to 110degE, and changed the standard parallels to 70 & 75. There is a 15deg graticule on top so that you can see conic projection better. It seems that as you push the SP further north, the "cone" gets tighter.
... View more
03-02-2015
05:40 AM
|
1
|
1
|
882
|
|
POST
|
Also had a look at the data. This offset is far too large to be a different datum issue. The direction of offset also seems to be in different directions from west to east. I think feature I03 is unsavable. Probably relates back to its original source and its projection parameters. It also looks much more generalized than IND_adm2. ie it was captured from something 5mill scale or something. Why do you need it anyway?
... View more
03-01-2015
10:35 PM
|
0
|
7
|
2752
|
|
POST
|
Or, something very similar, use the SearchCursor next method. Cur = arcpy.da.SearchCursor(Feature, [Flds])
row = Cur.next()
... View more
02-27-2015
03:41 AM
|
0
|
6
|
7288
|
|
POST
|
More picky terminological issues... You seem to be mixing up "projecting", ie changing the coordinate system from, say geographic lat/long to UTM for example. And a datum transformation, changing the underlying basis for the coordinate system. If you do not have survey level data I would have thought that NAD83 & WGS84 would be functionally equivalent. But there is a bunch of available transforms between the 2. But the options are many and varied. Melita can advise if you if she knows where the data is coming from.
... View more
02-27-2015
03:24 AM
|
0
|
0
|
7524
|
|
POST
|
Just use the normal windows file explorer to check the file permissions. Make sure that they are not read only (and the directory the files are in). In Catalog above, can you preview the data?
... View more
02-26-2015
01:09 AM
|
0
|
0
|
3485
|
|
POST
|
ArcGIS version? Show us a screenshot of the data in ArcCatalog. Have you turned off background processing. Is the image local. Have you checked file permissions? If you use the properties page to define the projection, what happens?
... View more
02-25-2015
02:48 AM
|
0
|
2
|
3485
|
|
POST
|
It is possible. Just in your data the Y coords will be negative. If you want it in the correct zone and hemisphere use the project tool (NOT the define projection tool).
... View more
02-25-2015
02:45 AM
|
1
|
1
|
1738
|
|
POST
|
Instead of using the toolbox, why not navigate to the image file in ArcCatalog, get the properties and define the projection there. Also turn off background processing.
... View more
02-25-2015
02:38 AM
|
0
|
4
|
3485
|
|
POST
|
Just a picky terminology issue.... You can't actually have your data IN WGS84. Because WGS84, by itself, is not a coordinate system. It is a datum & ellipsoid (& a geoid). You can have it IN GCS_WGS84 (geographic, based ON the WGS84 datum / ellipsoid). Then project it to a projected UTM zone based on the WGS84 datum.
... View more
02-25-2015
02:31 AM
|
2
|
1
|
11428
|
|
POST
|
Permission problems perhaps? Try copying the image locally and then define the projection.
... View more
02-25-2015
02:26 AM
|
0
|
6
|
3485
|
| 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
|