POST
|
Well, I haven't gone as far as creating a simple project to isolate the issue ... but I was able to print out the geometry information for both the polygon and the cutter polyline before the application froze: Polygon (wkid: 3857): Ring 0: (-9945872.290500, 3557729.840000) (-9945416.665400, 3557715.408400) (-9945662.002000, 3557181.440500) Cutter (wkid: 102100): Path 0: (-9945874.788078, 3557560.893746) (-9945353.250412, 3557550.928058) (-9945702.049488, 3557082.540727) (-9945366.537996, 3557139.012959)
... View more
10-21-2014
12:46 PM
|
2
|
0
|
245
|
POST
|
I have tried that, and unfortunately it does not seem to have any effect.
... View more
10-21-2014
12:43 PM
|
0
|
0
|
245
|
POST
|
Hello: I have created a tool that allows a user to draw a polyline that is then used to cut a polygon. I am currently using this code:
AGSMutablePolygon* polygon = [myPolygonGraphic.geometry mutableCopy];
AGSMutablePolyline* cutline = [(AGSMutablePolyline*)self.mapView.sketchLayer.geometry mutableCopy];
NSArray* cutResults = [[AGSGeometryEngine defaultGeometryEngine] cutGeometry:polygon withCutter:cutLine];
For a majority of the polylines that I draw this works perfectly fine .. however, about 75% of the time, when I create a polyline that is similar to the letter Z, the application freezes on the cutGeometry:withCutter: call locking the CPU at 100% on the main thread. It doesn't seem to matter which part(s) of the Z intersect the polygon. Profiling the app in Instruments shows that the application is doing some heavy processing in the following methods: Esri_runtimecore::Geometry::Topo_graph::update_chain_area_and_perimeter_(long long) -> Esri_runtimecore::Geometry::Math_utils:Kahan_summator::add(double) -> Esri_runtimecore::Geometry::Attribute_stream_of_dbl::read_point_2D(long long) const I have tried using non-mutable copies of the geometry as well ... no luck. So am I missing something here? is there some reason my code is failing or is it just an internal esri runtime bug? (infinite loop?) Is there another method out there that I can use to cut the polygon (that will work in a disconnected state)? Thanks in advance.
... View more
10-17-2014
03:13 PM
|
0
|
4
|
2153
|
POST
|
All you need to do is cast your Cursor.NextRow as an IFeature:
Dim SelFeature As IFeature = Nothing
Dim Cursor As ICursor = Nothing
SelSet.Search(Nothing, True, Cursor)
SelFeature = CType(Cursor.NextRow, IFeature)
Note the following excerpt from here: By default in VB, casting is automatically done for you when you assign objects to variables. The objects are then automatically casted to the variables' type. This behavior can be influenced by an option line on top of your code file: Option Strict On
Option Strict Off When on, casting is strict and not automatic.
... View more
04-12-2012
06:04 AM
|
0
|
0
|
189
|
POST
|
Julie: First of all, Welcome to ESRI 🙂 With the ArcGIS Desktop 10 Evaluation Version, there should be an option during installation (might have to do a custom install/repair) to install the Developer Kit. When this is installed you get access to a large array of Sample Programs with a version in C# and a version in VB.NET for every Sample. The Samples directory gets installed to the following location: C:\Program Files (x86)\ArcGIS\DeveloperKit10.0\Samples\ Hope that helps, -Kevin
... View more
04-11-2012
08:53 AM
|
0
|
0
|
296
|
POST
|
Margo: I put together a quick Console Application to test your MapServer Spatial Query. I was able to get it to work with the following code ... (I apologize that it is in C# instead of VB.NET ... I can convert it if necessary)
IPropertySet connProps = new PropertySet();
connProps.SetProperty("Url", "http://www3.multco.us/ArcGIS/Services");
AGSServerConnectionFactory agsSCFac = new AGSServerConnectionFactory();
IAGSServerConnection agsSConn = agsSCFac.Open(connProps, 0);
IAGSEnumServerObjectName pEnum = agsSConn.ServerObjectNames;
IAGSServerObjectName pSOName = pEnum.Next();
while (pSOName != null)
{
Console.WriteLine(pSOName.Name);
if (pSOName.Name.Equals("BaseMap/Taxlots")) break;
pSOName = pEnum.Next();
}
if (pSOName != null)
{
IName pName = pSOName as IName;
IMapServer pMapServer = pName.Open();
IMapServerInfo pMapServerInfo = pMapServer.GetServerInfo(pMapServer.DefaultMapName);
IMapDescription pMD = pMapServerInfo.DefaultMapDescription;
IPoint pnt = new Point();
pnt.SpatialReference = pMD.SpatialReference;
pnt.PutCoords(7682600.809, 681343.674);
ISpatialFilter pSpatFilter = new SpatialFilter();
pSpatFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects;
pSpatFilter.Geometry = pnt;
pSpatFilter.WhereClause = "PROPID = 'R311157'";
IRecordSet records = pMapServer.QueryFeatureData(pMD.Name, 0, pSpatFilter);
Console.WriteLine("Found " + records.Table.RowCount(null) + " records");
ICursor pCur = records.get_Cursor(true);
IFeature pFeat = pCur.NextRow() as IFeature;
if (pFeat != null)
{
Console.WriteLine("SUCCESS! Found Property: " + pFeat.Value[pFeat.Fields.FindField("PROPID")]);
}
}
That means that your map service is fine, and that there is something wrong in the implementation ... In my code above, I used a Point that I created instead of a Feature from a Layer in a Map. That might be where your problem lies ... Hope this helps, -Kevin
... View more
04-05-2012
03:14 PM
|
1
|
0
|
175
|
POST
|
I just tried this question over in the ArcGIS for Windows Phone SDK Forum and figured I would keep these two posts connected: http://forums.arcgis.com/threads/54582-Getting-quot-Invalid-file-or-corrupted-file-quot-Exception-when-Opening-Map-Cache-after-Sync
... View more
04-05-2012
06:29 AM
|
0
|
0
|
225
|
POST
|
Ok, So I have this Windows Mobile 6 ArcGIS Mobile 10 SDK application that I can get to run wonderfully as long as I have created a mobile cache and physically placed it onto the device. But whenever I try to use a MobileServiceConnection, MobileCache, and MobileCacheSyncAgent to Synchronize my map with the MapServer on my ArcGIS Server I get a "Invalid file or corrupted file" exception as soon as I try to open the MobileCache. I checked the ArcGIS Server logs and it appears to be receiving the request, and processing it correctly:
Level Message Time Configuration
INFO3 Server Context released. 2012-03-23 17:40:37 Facilities.MapServer
INFO2 Binary request successfully processed. Response size is 2136 bytes. 2012-03-23 17:40:37 Facilities.MapServer
DEBUG MobileSync: Get Schema [elapsed time = 0.001189 seconds]. 2012-03-23 17:40:37 Facilities.MapServer
DEBUG Schema Checksum 2197403820. 2012-03-23 17:40:37 Facilities.MapServer
INFO2 Binary request received. Request size is 5 bytes. 2012-03-23 17:40:37 Facilities.MapServer
INFO3 Server Context created. 2012-03-23 17:40:37 Facilities.MapServer
Here is my code:
try
{
if (!Utility.CheckURLConnection(AppProps.MobileMapServiceURL + "?wsdl"))
{
MessageBox.Show("Not able to connect to map server.");
}
mobileMapServiceCache.StoragePath = mobileMapServiceCachePath;
mobileMapServiceCache.DeleteCache();
mobileMapServiceConn.Url = AppProps.MobileMapServiceURL;
MobileCacheSyncAgent mobileSync = new MobileCacheSyncAgent(mobileMapServiceCache, mobileMapServiceConn);
if (mobileSync.IsValid)
{
mobileMapServiceConn.CreateCache(mobileMapServiceCache);
//mobileSync.StateChanged += new EventHandler(mobileSync_StateChanged);
//mobileSync.ProgressChanged += new EventHandler<MobileCacheSyncAgentProgressEventArgs>(mobileSync_ProgressChanged);
SyncResults mobileResults = mobileSync.Synchronize();
MessageBox.Show(mobileResults.DataSizeReceived.ToString());
mobileMapServiceCache.Open();
map1.DataSources.Add(mobileMapServiceCache);
}
}
catch (Exception ex)
{
MessageBox.Show("Cannot synchronize with the mobile map service: " + ex.Message);
} I even tried adding event handlers to the MobileCacheSyncAgent ... but they were never called ... The MessageBox right before the mobileMapServiceCache.Open(); call always return 0 ... back in 9.3.1 all we had to do was use a MobileService ... am I doing something wrong? Please help! Furthermore, I have tried the following with no success downloading and installing the latest build of ArcGIS Mobile (build 2550) Enabling Feature Access on the MapService changing the map service from pooled to non-pooled using a different/simple Map Service with only 1 featurelayer breaking the synchronize process down to synchronizing each FeatureLayer individually with the FeatureLayerSyncAgent Setting the SynchronizationDirection to SyncDirection.DownloadOnly changing the WebClientProtocolType to WebClientProtocolType.SoapWebService using DownloadExtent instead of Synchronize compiled the application in Release (instead of debug) tried it on a different Emulator tried it on an actual device I have also discovered that in the MobileCache directory, the only file that is getting updated is the MobileCache.db-journal. Deleting the contents of the db-journal file (or simply deleting the file) allows the application to open the MapCache correctly. However, it does not have any of the new data from the map service. Somehow, the DownloadExtent/Synchronize process correctly makes a request to ArcGIS Server, gets a response back and then writes some junk in the .db-journal file, thus corrupting my local map cache and not actually getting any of the new data. maybe someone can explain how the process is supposed to work and how the files in the MobileCache directory are supposed to be updated to help me narrow down the problem. In case you are curious ... here is one example of what the db-journal is populating with:
�?�?ù ¡c�? ï�?e�?� /
�? �? ' #2sde.DEFAULT" �? �?þÿÿÿ�?ê�?ÿï�?e�?� SQLite format 3 @ 3 �? <Á ãûöñìçâÝ�?�?�?�?�?¿ºµ°«¦¡�?�??�??�?�?~ytoje`[VQLGB=83-'! ý÷ñëå�?�?�?Í�?Á #GGEtablelayer0_current_spatial_parentlayer0_current_spatial_parentCREATE TABLE "layer0_current_spatial_parent"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER)EE9tablelayer0_current_spatial_rowidlayer0_current_spatial_rowidCREATE TABLE "layer0_current_spatial_rowid"(rowid INTEGER PRIMARY KEY, nodeno INTEGER)CC/ �?A �?> �?: Ð5 �?1 �?- �?( ¿& ½" ¸ µ ° ® © ¦ ¡ Ÿ š �?? �?? { �?�y �?t �?r �?�m {k yf te r` p_ k\ iY dX bS ]R ZM UK SG NE K@ F> C9 >7 <2 71 5, 3+ .( ,% '$ %
�f`
I originally posted this over in the ArcGIS Mobile Forum, but was unable to get any help 😞 ... not sure if this forum will get any more attention or not but I figured it was worth a shot 🙂 Thanks in advance! -Kevin
... View more
04-05-2012
06:27 AM
|
0
|
1
|
3028
|
POST
|
Ted: The "Create Mobile Map" in ArcGIS 10 is essentially 10's version of what 931 did. It does produce different files, but it is also intended to be used by a different Runtime (v10). -Kevin
... View more
04-04-2012
09:02 AM
|
0
|
0
|
113
|
POST
|
Furthermore, I have tried the following with no success downloading and installing the latest build of ArcGIS Mobile (build 2550) Enabling Feature Access on the MapService changing the map service from pooled to non-pooled using a different/simple Map Service with only 1 featurelayer breaking the synchronize process down to synchronizing each FeatureLayer individually with the FeatureLayerSyncAgent Setting the SynchronizationDirection to SyncDirection.DownloadOnly changing the WebClientProtocolType to WebClientProtocolType.SoapWebService using DownloadExtent instead of Synchronize compiled the application in Release (instead of debug) tried it on a different Emulator tried it on an actual device I have also discovered that in the MobileCache directory, the only file that is getting updated is the MobileCache.db-journal. Deleting the contents of the db-journal file (or simply deleting the file) allows the application to open the MapCache correctly. However, it does not have any of the new data from the map service. Somehow, the DownloadExtent/Synchronize process correctly makes a request to ArcGIS Server, gets a response back and then writes some junk in the .db-journal file, thus corrupting my local map cache and not actually getting any of the new data. maybe someone can explain how the process is supposed to work and how the files in the MobileCache directory are supposed to be updated to help me narrow down the problem. In case you are curious ... here is one example of what the db-journal is populating with: �?�?ù ¡c�? ï�?e�?� /
�? �? ' #2sde.DEFAULT" �? �?þÿÿÿ�?ê�?ÿï�?e�?� SQLite format 3 @ 3 �? <Á ãûöñìçâÝ�?�?�?�?�?¿ºµ°«¦¡�?�??�??�?�?~ytoje`[VQLGB=83-'! ý÷ñëå�?�?�?Í�?Á #GGEtablelayer0_current_spatial_parentlayer0_current_spatial_parentCREATE TABLE "layer0_current_spatial_parent"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER)EE9tablelayer0_current_spatial_rowidlayer0_current_spatial_rowidCREATE TABLE "layer0_current_spatial_rowid"(rowid INTEGER PRIMARY KEY, nodeno INTEGER)CC/ �?A �?> �?: Ð5 �?1 �?- �?( ¿& ½" ¸ µ ° ® © ¦ ¡ Ÿ š �?? �?? { �?�y �?t �?r �?�m {k yf te r` p_ k\ iY dX bS ]R ZM UK SG NE K@ F> C9 >7 <2 71 5, 3+ .( ,% '$ %
�f`
... View more
03-28-2012
08:51 AM
|
0
|
0
|
225
|
POST
|
Ok, So I have this Windows Mobile 6 ArcGIS Mobile 10 SDK application that I can get to run wonderfully as long as I have created a mobile cache and physically placed it onto the device. But whenever I try to use a MobileServiceConnection, MobileCache, and MobileCacheSyncAgent to Synchronize my map with the MapServer on my ArcGIS Server I get a "Invalid file or corrupted file" exception as soon as I try to open the MobileCache. I checked the ArcGIS Server logs and it appears to be receiving the request, and processing it correctly:
Level Message Time Configuration
INFO3 Server Context released. 2012-03-23 17:40:37 Facilities.MapServer
INFO2 Binary request successfully processed. Response size is 2136 bytes. 2012-03-23 17:40:37 Facilities.MapServer
DEBUG MobileSync: Get Schema [elapsed time = 0.001189 seconds]. 2012-03-23 17:40:37 Facilities.MapServer
DEBUG Schema Checksum 2197403820. 2012-03-23 17:40:37 Facilities.MapServer
INFO2 Binary request received. Request size is 5 bytes. 2012-03-23 17:40:37 Facilities.MapServer
INFO3 Server Context created. 2012-03-23 17:40:37 Facilities.MapServer Here is my
try
{
if (!Utility.CheckURLConnection(AppProps.MobileMapServiceURL + "?wsdl"))
{
MessageBox.Show("Not able to connect to map server.");
}
mobileMapServiceCache.StoragePath = mobileMapServiceCachePath;
mobileMapServiceCache.DeleteCache();
mobileMapServiceConn.Url = AppProps.MobileMapServiceURL;
MobileCacheSyncAgent mobileSync = new MobileCacheSyncAgent(mobileMapServiceCache, mobileMapServiceConn);
if (mobileSync.IsValid)
{
mobileMapServiceConn.CreateCache(mobileMapServiceCache);
//mobileSync.StateChanged += new EventHandler(mobileSync_StateChanged);
//mobileSync.ProgressChanged += new EventHandler<MobileCacheSyncAgentProgressEventArgs>(mobileSync_ProgressChanged);
SyncResults mobileResults = mobileSync.Synchronize();
MessageBox.Show(mobileResults.DataSizeReceived.ToString());
mobileMapServiceCache.Open();
map1.DataSources.Add(mobileMapServiceCache);
}
}
catch (Exception ex)
{
MessageBox.Show("Cannot synchronize with the mobile map service: " + ex.Message);
} I even tried adding event handlers to the MobileCacheSyncAgent ... but they were never called ... The MessageBox right before the mobileMapServiceCache.Open(); call always return 0 ... back in 9.3.1 all we had to do was use a MobileService ... am I doing something wrong? Please help! Thanks!!
... View more
03-23-2012
03:21 PM
|
0
|
2
|
1085
|
Title | Kudos | Posted |
---|---|---|
1 | 04-05-2012 03:14 PM | |
2 | 10-21-2014 12:46 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|