POST
|
I see that there is a new interface - isizerenderer but I can't seem to find any examples or additional information. Does anyone have any samples? I am using unique value renderers already but the marketing literature makes it sound like the isizerenderer is something new that I should use (even though it is just an interface to the co-class I already use). I also notice the the API reference for ArcGIS 10 no longer includes code samples. I found those very useful when figuring out how different co-classes and interfaces worked together. Thanks, Gary
... View more
09-20-2011
03:44 PM
|
0
|
0
|
820
|
POST
|
Hi Melita, Your understanding of the problem sounds correct but I may not be attempting to solve it properly. If you have any samples source code that I can look at, I would appreciate it. Just to clarify what i m attempting: I am reading data from our DB, creating features in several feature classes that exist in in-memory-workspaces, After building all of the feature classes, I want to center the map on the visible features. The original data is stored in decimal degrees but the map is displayed using Mercator projection with meter units. I am able to project the original data to mercator without any issue. After all the data has been processed, I want to cener the map on the visible data. I am attempting to do this by changing the central meridian from 0, to an appropriate value. This seems to be where my problem is. I am calculating the visible data by examing the extent of certain feature classes of my data. While running the application, I can reload some data and I want to repopulate some (but not all) of the feature classes and re-center on this data. For performance reasons, I am attempting to leave some of the feature classes alone and not re-load / re-process this data. On the map, I am displaying the sample world shape file that came with the sample application data. When I recenter the map, the shape file displays correctly, with the new central meridian. My feature class data does not appear correct. For example, if I change the central meridian to 180 degrees, the IDL of the shape file is displayed on the center of my map. The coordinates that I display tracking the mouse movement are correct as well. It is just the features related to the feature classes I created, that do not display correctly. Any ideas on what I am doing wrong? Thanks, Gary
... View more
10-17-2010
08:24 PM
|
0
|
0
|
219
|
POST
|
I am working on an application where I want to change central meridian so that if the user is looking at data near the IDL, the data is in the center of the map and there isn't an issue where data must wrap around. I am adding the data to the feature class using standard central meridian = 0. I then get the dataset extent's and then setting the map's spatialreference central merian to the midpoint of the extent. I have tried a variety of simple things such as setting the same modified spatial reference to the map layers. I have removed and re-added the layers to the map. Is there a simple solution for this or do I need to retrieve each piece of geometry of each feature and somehow apply a transformation for the new central meridian? Also looking at the documentation for ILayer::putref_SpatialReference the Remarks say: This property is only used for map display, setting this property does not change the spatial reference of the layer's underlying data. The ArcGIS framework uses this propert to pass the spatial reference from the map to the layer in order to support on-the-fly projection. To me, this sounds like exactly what I want. I want to add the data to the feature class, change the map's spatial reference and see the data projected correctly. What am I missing? I load and display the world shape file (from the sample data) and this projects exactly like I would expect when changing the central meridian. I have tested this on 9.2 SP5 and 9.3.1 SP 2 on Solaris. Thanks, Gary
... View more
10-14-2010
07:44 AM
|
0
|
3
|
414
|
POST
|
I am trying to display some text with features and I have created a new C++ class that implements the IFeatureRenderer to do this. In the Draw method, I access additional fields from the features found by the FeatureCursor and I explicitly call display->DrawText to display up to 6 text strings where I want and with the necessary size and color. Because I am using an inMemoryWorkspaceFactory, I cannot use the standard annotation features. Other text approaches that I have taken, don't seem to work well, including dynamic display layers. My problem is that when I call IScreen->Invalidate() to force ArcEngine to redisplay specific areas, the spatialQuery that is used to find the features that need to be refreshed, don't always find the features associated with the text that I am drawing. Therefore the screen is left blank where some of the text is normally drawn. I have thought about extending the IFeatureClass with IFeatureClassExtensions but I don't think that will solve the problem since the spatial query is using the shape stored in the feature class. I could try to change the geometry stored in the feature class to be a simple rectangle that contains the bounding box of my text but the text is drawn at a constant size, so the geometry will grow or shrink based on the zoom level. That would mean that on every zoom, I would need to recalculate each feature's bounding box which seems very inefficient.
... View more
04-16-2010
03:43 PM
|
0
|
0
|
1535
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|