|
POST
|
I'm receiving drawings from an external source for input into ArcGIS, not the other way around. If the next version of their in-house software uses entity-linked attributes then that's fine. But for now I'm stuck with trying to import EED attributes.
... View more
08-31-2010
01:02 PM
|
0
|
0
|
660
|
|
POST
|
Although ArcGIS 10 claims to read entity-linked attributes, it still doesn't dynamically read extended entity data (EED). As far as I can tell at this point, the only geoprocesssing tool that gives me access to EED is Import From CAD, which has been deprecated. Is there another, better way to import CAD features with EED?
... View more
08-31-2010
07:15 AM
|
0
|
4
|
1382
|
|
POST
|
The old ArcScripts site is frozen, and the new code gallery is seriously FUBAR: I just can't get uploads to work. The latest version of the GPS Custom Layer for ArcReader is available directly from my own web site: http://www.pierssen.com/arcgis10/arcreader.htm If I can ever get the code gallery to work for me 😞 I'll post it there as well.
... View more
08-16-2010
02:19 PM
|
0
|
6
|
1767
|
|
POST
|
I did find a code-behind workaround to access the restricted Map content after all! The basic approach is to export dynamic and tiled service layers through the REST API to image streams and overlay the results in a WriteableBitmap. You can then render graphics layers and UIElements on top of that. Probably more work than just using a PDF browser extension, but what the heck. Anyway, I've created a first draft of a PDF creation class and added it to the code gallery as well as my web site: http://www.pierssen.com/arcgis10/silverlight.htm 🙂
... View more
08-02-2010
08:18 AM
|
0
|
0
|
1682
|
|
POST
|
You're missing the point, which is to get access to the bytes of a WriteableBitmap in order to write out an image file, not just display it online. Having said that, I take back my previous post. REST is the answer, if you're returning image bytes instead of a URL. I just tried it, created a WriteableBitmap from the request stream and it worked! I think I finally have the workaround needed for PDF creation.
private void BitmapTest()
{
string sError = "";
try
{
string sURL = "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export";
string sData = "?f=image";
int iWidth = (int)MyMap.Width;
int iHeight = (int)MyMap.Height;
sData += "&size=" + iWidth.ToString() + "," + iHeight.ToString();
sData += "&bbox=-121,32,-113,36";
Uri uri = new Uri(sURL + sData);
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(uri);
req.BeginGetResponse(new AsyncCallback(RespCallback), req);
}
catch (WebException e)
{
sError = e.Message;
}
catch (Exception e)
{
sError = e.Message;
}
}
private void RespCallback(IAsyncResult ar)
{
string sError = "";
try
{
HttpWebRequest req = (HttpWebRequest)ar.AsyncState;
HttpWebResponse res = (HttpWebResponse)req.EndGetResponse(ar);
if (res.StatusCode == HttpStatusCode.OK)
{
string sType = res.ContentType;
int iLen = (int)res.ContentLength;
Stream stream = res.GetResponseStream();
this.Dispatcher.BeginInvoke(() => StreamToBitmap(stream));
}
}
catch (WebException e)
{
sError = e.Message;
}
catch (Exception e)
{
sError = e.Message;
}
}
private void StreamToBitmap(Stream s)
{
string sError = "";
try
{
BitmapImage bmi = new BitmapImage();
bmi.SetSource(s);
WriteableBitmap wbm = new WriteableBitmap(bmi);
int iWidth = wbm.PixelWidth;
int iHeight = wbm.PixelHeight;
int i = wbm.Pixels[0]; // Bingo!
}
catch (Exception e)
{
sError = e.Message;
}
}
... View more
07-29-2010
08:38 AM
|
0
|
0
|
802
|
|
POST
|
That's fine as long as you're not trying to render a map with a layer defined by a URL, because then you can't access the WriteableBitmap pixels to create the image to add to the PDF. I haven't been able to find a true code-behind solution. There may be a way to do it through a custom web service, but I haven't figured out how to do that either.
... View more
07-28-2010
02:48 PM
|
0
|
0
|
1682
|
|
POST
|
Nope. REST won't work either, because the resulting image is accessed via a URL. Double 😞 😞 . The frustrating thing is that my app is intranet and truly isn't cross-domain. Silverlight just thinks it is because the Map layer requires a URL.
... View more
07-28-2010
02:38 PM
|
0
|
0
|
802
|
|
POST
|
Is there any way in REST/Silverlight to export a map to an image file? WriteableBitmap won't allow access to content from a UI element that uses URL-derived properties.
... View more
07-28-2010
12:23 PM
|
0
|
0
|
802
|
|
POST
|
By "online" sample I mean the one published by ESRI at the API for Silverlight resource center. It uses the Streetmap_2D service, which is in geographic coordinates. I was assuming knowledge of this in my original post. To verify the measurements, I brought the same service into ArcMap and projected it to UTM (WGS 84) for the area I was testing. In the sample, the MeasureAction's map units are set to DD, and the perimeter calculation is correct, so obviously the geodesic distance algorithm is used in that case. It is the area calculation that I am bringing into question.
... View more
07-19-2010
01:16 PM
|
0
|
0
|
315
|
|
POST
|
I've noticed that in the online MeasureAction sample, the perimeter is correct but the area is off compared to a similar measurement in a projected coordinate system. Is a cartesian or geodesic calculation used for the area? I've adapted the geodesic area code from GRASS and the results compare favorably to the projected results.
... View more
07-19-2010
11:43 AM
|
0
|
2
|
867
|
|
POST
|
I found a workaround: if I capture the current map position using Map.MouseMove, I can use Draw.DrawBegin to apply that point. DrawBegin also fires with each vertex addition, so I need to ignore it thereafter until after DrawComplete.
... View more
07-08-2010
09:53 AM
|
0
|
0
|
416
|
|
POST
|
In the Draw class, when the draw type is polyline or polygon, the first vertex placed doesn't fire the VertexAdded event. Has anyone found a way to capture the first vertex before the drawing is completed?
... View more
07-07-2010
02:36 PM
|
0
|
2
|
643
|
|
POST
|
Adding the STAThread attribute dramatically changes C# and F# performance, and adding in the missing ReleaseComObject lines significantly improves VB .NET performance, bringing all three in line with each other as I had originally expected. Also, setting the "CLR Thread Attribute" and "CLR Unmanaged Code Check" linker settings in the C++/CLI benchmark [the actual benchmark code is unmanaged] brings its performance to about the same as C++/ATL, which is what it should be. :cool: So here once again *sigh* are my benchmarks for 9.3.1: Seconds: Java: 81 IronPython: 54 Python: 40 VB/C#/F#: 27 VBA: 14 C++: 13 Python/arcgisscripting: 43 and now for the 10.0 RC: Seconds: Java: 78 IronPython: 44 Python: 33 VB/C#/F#: 19 VBA: 8 C++ : 8 Python/arcpy: 98 At the DevSummit, the ESRI geoprocessing team said for the 10.1 release they hope to improve the performance of arcpy and add Python support to the add-in framefork. :rolleyes: I've also updated both the sample code and the presentation at my web site. 😛
... View more
04-08-2010
01:54 PM
|
0
|
0
|
1280
|
|
POST
|
I can't find anything in the RC Desktop C++ documentation for runtime binding. IArcGISVersion seems to work just as it did in the 9.4 beta, but I can find no documentation for it. Perhaps it's in the Engine C++ docs?
... View more
04-08-2010
11:49 AM
|
0
|
0
|
888
|
|
POST
|
Excellent! Thanks for finding that out. It was my assumption all along that their performance should be the same, and I was shocked when the benchmark turned out otherwise. I'm going to look into whether this is also the reason behind crappy C++/CLI performance. Update: Never mind my last update. I've brought VB in line with C# and F#, and C++/CLI (unmanaged) is in line with C++/ATL.
... View more
04-08-2010
09:27 AM
|
0
|
0
|
668
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-04-2012 06:42 AM | |
| 1 | 09-23-2021 10:42 AM | |
| 2 | 09-28-2021 07:07 AM | |
| 1 | 04-07-2021 10:31 PM | |
| 3 | 03-21-2021 01:14 PM |
| Online Status |
Offline
|
| Date Last Visited |
01-07-2022
08:31 AM
|