POST
|
... another idea would be to convert the layer to an Equal-area projection, run the procedure. And see what happen.
... View more
12-16-2020
05:47 PM
|
0
|
0
|
1033
|
POST
|
I am working on a global scale. Ideally the hexagon(s) should be 0.1 degrees on the side. Although I think the problem might be in the spatial reference. Don't you think.
... View more
12-16-2020
05:18 PM
|
0
|
2
|
1034
|
POST
|
I've changed it to be the area of equal size hexagons where the formula for the area is: there I added this equation to have hexagon of 5 degrees each, consequently: area = "{size} Square{unit}s".format(size=((3.0*math.sqrt(3.0))/2.0)*(a**2.0), unit=u)
area
'64.9519052838329 SquareDegrees'
... then the result is again the same error. Can this function deal with geographical coordinates rather than linear (like UTM)?
# Use the extent's spatial reference to project the output
spatial_ref = extent.spatialReference
spatial_ref
... View more
12-16-2020
03:32 PM
|
0
|
1
|
1040
|
POST
|
Thanks for your reply. Actually the Feature Class in on a shape that is on Degrees. I might use the area as: w = extent.width
h = extent.height
u = extent.spatialReference.angularUnitName
w, h, u
(359.999999902, 179.491346668, 'Degree')
area = "{size} Square{unit}s".format(size=w/3 * h/3, unit=u)
area
'7179.653864765539 SquareDegrees' but got the same error. Do you have any other suggestion. Thanks.
... View more
12-16-2020
03:10 PM
|
0
|
3
|
1042
|
POST
|
sdf = pd.DataFrame.spatial.from_featureclass(os.path.join(gdb_file, gdb_layers[1]))
sdf.head()
# Describe the input feature and extract the extent
description = arcpy.Describe(os.path.join(gdb_file, gdb_layers[1]))
extent = description.extent
tessellation_extent = sdf.spatial.full_extent
spatial_ref = extent.spatialReference
I am trying to generate a Feature Class with hexagons by using the method GenerateTessellation_management with this code: arcpy.GenerateTessellation_management(Output_Feature_Class=gdb_file+r"\hex_tessellation",
Extent=tessellation_extent,
Shape_Type="HEXAGON",
Size="1000000 Square Foot",
Spatial_Reference=spatial_ref
) And I am getting this error: I am following the documentation as per the following website: https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/generatetesellation.htm Any idea why this is not working? Thanks in advanced. Dario
... View more
12-16-2020
09:12 AM
|
0
|
8
|
1068
|
POST
|
I have browsed the web searching for way to install the FileGDB API in order to be able to use the driver to read gdb files from python. I have downloaded the file filegdb_api_vs2012_1_4.zip and within I found the FileGDBAPI.dll which I've placed on C:\ProgramData\Anaconda3\envs\gis2\Lib\site-packages\osgeo. When I do this test below, the driver doesn't come up. COuld you please provide some assistance on this? Thanks. from gdal import ogr driver = ogr.GetDriverByName("FileGDB") print(driver.GetName()) and I get this error: AttributeError: 'NoneType' object has no attribute 'GetName'
... View more
08-12-2020
08:26 AM
|
0
|
4
|
13031
|
Online Status |
Offline
|
Date Last Visited |
12-18-2020
09:38 AM
|