|
POST
|
I am currently putting a series of posts together on the topic of scatter. Keep an eye on these to see if they give you any ideas: http://libjoe.blogspot.com/2014/02/scatter-for-terrain-database-generation.html Joseph Armbruster
... View more
02-01-2014
01:12 PM
|
0
|
0
|
342
|
|
POST
|
You can use the SpatialReferenceEnvironmentClass. Cast it to an ISpatialReferenceFactory and use the "CreateGeographicCoordinateSystem" method. For ex: ISpatialReferenceFactory spatial_reference_factory = new SpatialReferenceEnvironmentClass(); int wgs_84 = (int)esriSRGeoCSType.esriSRGeoCS_WGS1984; IGeographicCoordinateSystem geo = spatial_reference_factory.CreateGeographicCoordinateSystem(wgs_84); ISpatialReference spatial_reference = geo as ISpatialReference; // you can set your spatial reference domain / etc... here if you'd like spatial_reference.SetDomain(-180, 180, -90, 90); Then you can use this spatial reference when you call Project.
... View more
01-13-2014
11:21 AM
|
0
|
0
|
452
|
|
POST
|
Jeff, When I load my mxd and switch to data frame mode, the export-map dimensions are not altered by zooming in and out. The dimensions of export-map remain the same and are being calculated to accomodate the extents of the data I have loaded. Joe
... View more
10-10-2013
05:24 AM
|
0
|
0
|
1039
|
|
POST
|
This may be a more simple solution: Create a page layout that is the size AND shape of the output image you want to create (with dataframe exports you can't specify page size, only pixel width/height). On the layout you will have a single data frame with your data. Export the layout rather than the data frame. Here is a snippet from the help: If you have to export a data frame, then multiply the resolution (default=96) times the size (this is a general rule but results can vary from machine to machine). For example if i want a 3 inch x 3 inch output, then my export_height and export_width will = 288 (96x3). Jeff This still does not answer my question. When you say "times the size". What "size" are you referring to? Tell me the exact arcpy dataframe object I should use to obtain that "size" that you speak of. This, is what my question boils down to. Joe
... View more
10-03-2013
08:58 AM
|
0
|
0
|
1566
|
|
POST
|
The easiest solution is to create a page layout the size of the desired data frame and export the layout, not the data frame. See response to related post. http://forums.arcgis.com/threads/93836-ExportToTif-width-height-calculation Jeff It seems silly to me that I would have to create an entirely new page layout, just to do an export of a data frame. When i'm in ArcMap and select "Export Map", I do not have to create a new layout before that operation. My only issue is that of calculating the dimensions, precisely as the Export Map UI does.
... View more
10-03-2013
08:53 AM
|
0
|
0
|
1039
|
|
POST
|
I'm not knowledgeable enough about arcpy to do that, and fortunately didn't need to be either. Here's a clumsy way you might get what you are looking for. The key additions that Drewsky made in the code involved the "ar". In his code these two lines were the key to producing a properly geoereferenced tif that wasn't skewed since it got the actual pixels being used: ar = df.extent.height / df.extent.width arcpy.mapping.ExportToTIFF(mxd,r"C:\ImageTemp\" + str(pageNum) + ".tif",df,1024,1024*ar,48,True) I typically use 9036,9036*ar in my code and this produces pdfs that are 9036 x a number that depends on my window size. (Right click on the tif in Windows Explorer - Properties - Details.) If you run your code and look at a resulting tif you will see this second number. In a batch I'm currently running it is 10339 in all the tifs. If I didn't change the window size I could depend on that. This does not address my problem really (see the other post), since you are assuming that your data frame can always safely/clearly export into a 1024*Y image (which may not always be the case).
... View more
10-03-2013
08:49 AM
|
0
|
0
|
1039
|
|
POST
|
Matt - no kidding 🙂 The question is: What is the formula for the width and height when using a data frame?
... View more
10-03-2013
05:33 AM
|
0
|
0
|
1566
|
|
POST
|
If you can write code, give this a shot: - start with one point, P0 - obtain the next available point that is closest to P0, call it P1 - obtain the next available point that is closest to the line segment P0-P1 - now you have a triangle <P0,P1,P2>, aka polygon (you can construct a polygon from it...), call it PG - for all remaining points: find the next point that is closest to your polygon PG cut the point into the polygon using the verts of the closest segment Disregarding performance and degenerate cases, I think you will find this approach to be very straight-forward.
... View more
10-02-2013
05:50 AM
|
0
|
0
|
739
|
|
POST
|
I am using arcpy to export of a dataframe to geotiff. The dataframe contains all of the feature / raster data for a JOG sheet. The code looks like this: dpi = 300 output_tif = #... path to the output geotiff path_to_mxd = # ... contains the path to the mxd of interest mxd = arcpy.mapping.MapDocument(path_to_mxd) # we assume basemap exists... target_data_frame = arcpy.mapping.ListDataFrames(mxd, 'BaseMap')[0] mxd.activeView = target_data_frame arcpy.mapping.ExportToTIFF( map_document = mxd, out_tif = output_tif, data_frame = target_data_frame, resolution = dpi, world_file = True, color_mode = '24-BIT_TRUE_COLOR', tiff_compression = 'NONE', geoTIFF_tags=True) After exporting, I end up with a 640x480 image. For the content of a JOG map sheet, this is obviously not what I want. There are two additional parameters I can provide to this function; df_export_width and df_export_height but I am not certain how they should be calculated using only the meta-data that is available via the arcpy interfaces (mapdocument, pagesize, elementsizes / etc...). I would like to reproduce the exact-width and height values for a given DPI, the same way the "Export Map" dialog calculates it within arcmap. The detail here is that I am using a dataframe, not a layout view. For layout view, the formula is trivial: - df_export_width = mxd.pageSize.width * conversion_factor * dpi - df_export_height = mxd.pageSize.height * conversion_factor * dpi In my case, the page units are centimters, so the conversion factor is 0.393701. Obviously, this logic does-not make sense when using a dataframe... So what is the formula for width and height when using a data frame? Thank You in advance.
... View more
10-02-2013
05:33 AM
|
0
|
5
|
4461
|
|
POST
|
John Sobetzer, Did you figure out how to calculate the width and height exactly as ESRI does in their "Export Map" dialog? If so, can you post a snippet of your calculation? I just opened up a related-thread. Feel free to chime in. http://forums.arcgis.com/threads/93836-ExportToTif-width-height-calculation
... View more
10-02-2013
05:18 AM
|
0
|
0
|
1039
|
|
POST
|
Has anyone else experienced this? - Fire up ArcCatalog or ArcMap - Create a new Python Toolbox (do not modify anything in the default toolbox) - Close ArcMap / ArcCatalog - Start ArcCatalog - it will crash with a send report error box. - Start ArcMap - it will load just fine Notes: - I am using ArcGIS 10.1.1.3143. - If I copy/paste my custom toolbox code into the .pyt, it works fine from within ArcMap but ArcCatalog continues to crash.
... View more
08-29-2013
03:49 AM
|
1
|
15
|
2885
|
|
POST
|
I am investigating an SQL Server 2008 performance issue with ArcGIS and 'Enterprise geodatabases'. I create an enterprise geodatabase, create an sdebinary feature class for the linears, then import the features into it. There are roughly 600k linear roads in this particular feature class. After all the features are imported, I am migrating the storage engine to GEOMETRY. When I add the features to ArcMap, I observe a full refresh taking roughly 25 seconds. Within management studio, if I profile the particular statement that is being prepared and executed, I see that it is taking 70% of its time in a Filter and 25 seconds also within management studio. It's an incredibly simple query, something similar to this ' select shape from roads where filter() = 1'. I went ahead and added a hint to the query for the spatial index and the time to obtain the query results for the same statements was 8 seconds. All fingers point to the spatial index not being utilized by the query planner. Both of these have led me no-where: http://support.esri.com/en/knowledgebase/techarticles/detail/36617 http://support.esri.com/es/knowledgebase/techarticles/detail/38871 (we are using 10.52.4266 which is > all the versions mentioned here) I am still investigating the issue, any advice or suggestions are appreciated.
... View more
06-27-2013
04:59 AM
|
0
|
0
|
407
|
|
POST
|
Chriz, You could create a User control for your form by coming off of UserControl and IDockableWindowDef. Then you can create a Command and during OnCreate use the IDockableWindowManager interface of your application object to create a new window. This will embed the control within ArcMap and make it behave like the TOC or any other dockable control 🙂 Try it out: // your new dockable control [Guid("YOUR_GUID")] [ClassInterface(ClassInterfaceType.None)] [ProgId("YOUR_PROG_ID")] public class PluginWindow : UserControl, IDockableWindowDef { // blah blah... } // what do to in oncreate for your command IDockableWindowManager manager = application as IDockableWindowManager; UID window_uid = new UIDClass(); window_uid.Value = YOUR_NEW_CONTROLS_GUID; _dockable_window = manager.GetDockableWindow(window_uid); _dockable_window.Dock(esriDockFlags.esriDockRight); // private member in you command IDockableWindow _dockable_window;
... View more
06-18-2013
04:24 AM
|
0
|
0
|
720
|
|
POST
|
Assuming the geodatabase already exists, you can do something like this: FeatureClassToFeatureClass export = new FeatureClassToFeatureClass(); export.in_features = "PATH_TO_SHAPEFILE"; export.out_path = "PATH_TO_GEODATABASE_DATASET"; export.out_name = "NEW_FEATURE_CLASS_NAME"; Geoprocessor geoprocessor = new Geoprocessor(); // set your geoprocessor environment settings here // ... geoprocessor.OverwriteOutput = true; geoprocessor.Execute(export, null); // check return / messages / etc... Note: This code is not complete but should be good enough to get you started.
... View more
06-18-2013
04:15 AM
|
0
|
0
|
1028
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-06-2018 12:48 PM | |
| 1 | 02-15-2018 06:51 AM | |
| 1 | 08-29-2013 03:49 AM | |
| 1 | 02-02-2014 08:50 AM | |
| 1 | 02-03-2014 11:32 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-14-2024
05:13 AM
|