I need to add a point in an existing feature class using .NET API of ArcGIS Server 10 in C# (Visual Studio 2008). I'm using a sample from ESRI Resource Center (ArcGIS_SimpleEdit_CSharp). The following shows the portion of the code that creates the new point using X/Y coordinates.
ESRI.ArcGIS.Geometry.IPoint aoPoint = serverContext.CreateObject("esriGeometry.Point") as
ESRI.ArcGIS.Geometry.IPoint;
aoPoint.PutCoords(actionRecord.Location.X, actionRecord.Location.Y);
But I need to use Latitude and Longitude (with decimal precision) instead of X/Y coordinates. How can I do that?
Thank you
If your data is in Latitude/Longitude and your feature class is in some projected coordinate system, then you need to project your lat/long data before adding the points to your feature class. For this you would want to use the IGeometry.Project method, which you can find more information about here.
Be aware that depending on the datum of your latitude/longitude data, as well as that of your feature class, you may need to perform a datum transformation as part of the projection process. In that case you would want the IGeometry.ProjectEx method (more info here and here - note the latter link includes links to some samples at the bottom which may be helpful).
I know this is not a complete answer, but hopefully I've provided a couple pointers to get you going in the right direction. If you can provide a little more detail on what exactly you are trying to do, then perhaps I can provide some more specific help.
One last point - it appears you are using the ArcGIS Server Web ADF here - are you aware that the Web ADF local connections are going away at version 10.1 of Server? Depending on the nature of your project, you may want to consider an alternate approach, such as using the SOAP or REST APIs, Geoprocessing services, and/or writing Server Object Extensions (SOEs) for any work that really requires custom ArcObjects.
Related
I need to use some new drills using unmodified original .MIN CNC programs for Okuma Thinc controller, MU6300V. I'm looking to use the Okuma API to detect when tool group 4 is loaded into the spindle and then alter the speed/feed when it drills. I am familiar with the API and .NET. Looking for some general guidance on objects/methods and approach.
If this is too difficult then I would settle for just modifying the feed rate when a G81 drill cycle is called for a tool in group 4.
The first part of your request is pretty straight-forward.
// Current Tool Number
Okuma.CMDATAPI.DataAPI.CTools.GetCurrentToolNumber();
// Group number of current tool
Okuma.CMDATAPI.DataAPI.CTools.GetGroupNo(CurrentToolNumber);
Altering the drill feed / speed will be more troublesome however.
You cannot set feed/speed overrides using the API.
That is, not without some additional hardware and special options.
Other people have done it actually.
Have you ever seen Caron Engineering's Tool Monitoring Adaptive Control?
Because I think that is essentially what you're asking for.
https://www.caroneng.com/products/tmac
The only other option you have is altering your part program to look for common variable values to set spindle speed and/or feed rate.
For Example
Use one variable to determine if fixed or variable value should be used, and another for the variable value
That way, on a machine that has your old drills and no THINC Application altering common variables, the fixed values are used. But, on a machine that has the application, it can look at the tool number or group and set a common variable that determines specific speed/feed values. Then those new values are used before starting the spindle and moving into the cut.
The choices available for changing feed/speed after the machine has entered a cut or commanded the spindle to run are:
Human operator at the control panel
TMAC
I have statistics for a project stored in a MySQL database and looking for a quick way to prototype a webpage which graphs various relationships in the data, using bar graph, line graph, pie chart, etc. I found something called "Dashing", but seems to use something called "coffeescript" which I'd rather not learn in my short time frame (~1 week).
Does anyone know of any good packages/frameworks that can help out with the job? If I could do it using only C/C++/obj-C it would be ideal, though Java is possible as well.
I decided on using PHP/Apache/MySQL and the Jpgraph PHP graphing framework.
I am quite new to Core Data, and I'm trying to implement it into my relatively simple OS X application. My application takes some file URLs provided by the user, gets some more information about the files (like creation date, for example), and then stores the URLs for use later.
I am wanting to have those file URLs, and related data, stored in a 'central' location so I can access, modify, and change the order of them (order is really important) from any of the classes in my application (correct me if I'm wrong, but I think Core Data is ideal for this).
I have my Core Data Model setup in Xcode (it only has one Entity which has a couple of Attributes), I've create an NSManagedObject Subclass to match the Entity in the Model, and I'm using Bindings to tie the data to a TableView. However, like I said, I need to be able get at this data from any class in my application. I have been reading Apple's Documentation and a book with a section on Core Data, however I am both struggling to get my head around it, and am yet to come across a section that describes the needs I mentioned above.
Any help with this (even just a link to a useful article) would be very much appreciated.
Thanks in advance.
I've researched this issue and have not found anything to meet my needs. I am worried that perhaps I'm using the wrong terms.
I would like to build a website interface that allows users to select different variables and then have those variables dynamical or automatically graphed or charted. I need it to be able to handle 100+ variables (there could be limits to how many were charted at one time) and display the data on a bar graph, pie chart, or line graph based on the users preference.
What would I need to make this happen?
Sounds like you need to use either Flash and ActionScript or JavaScript and HTML5.
I've been looking to do something like this too actually.
Need a facility for parsing the data, and then working out scales/ratios and to represent the data in a coherent way, with labels. Then you need to scale the shapes your using according to the scale that the data is covering, and for the sizes to naturally be proportional.
I'm starting to learn a little Flex just for fun and maybe to prove that I still can learn something new :) I have some idea for a project and one of its parts is a tree component which could display data in different ways depending on configuration.
The idea
There is list of objects having properties like id, date, time, name, description. And sometimes list should be displayed like this:
first level: date
second level: time
third level: name
and sometimes like this:
first level: year
second level: month
third level: day
fourth level: time and name
By level I mean level of nesting of course. So, we can have years, that have months, that have days, that have hours and so forth.
The problem
What could be the best way to do it? I mean, should I prepare data for different ways of nesting outside of component or even outside of flex? I can do it at web service level in C# where I plan to have database access layer and send to flex nice and ready to display XML or array of objects. But I wonder if that won't cause additional and maybe unneccessary network traffic.
I tried to hack some code in my component to convert my data objects into XML or ArrayCollection but I don't know enough of Flex and got stuck on elimination of duplicates or getting specific data by some key value. Usually to do such things I have STL with maps, sets and vectors and I find Flex arrays and even Dictionary a little bit confusing (I've read language reference and googled without any significant luck).
The question
So, to sum things up: should I give my tree component data prepared just for chosen type of display or should I try to do it internally inside component (or some helper class written in ActionScript)?
ADDITIONAL QUESTION
Would it be a good approach to prepare separate data models for each way of display and some converter to transfer data between them and resulting model would be binded to component as a dataProvider? Or maybe there is some other clever way to do it and my data will reorganize automagically by themselves? :)
I would favor receiving a raw stream of data from your web service and process it in various ways within the flex client (in a helper Actionscript class). Here are the advantages I see:
1) This gives a nice separation of responsibilities. E.g. the web service should know about the data but not what ways it will be displayed.
2) Faster processing and client responsiveness. Swapping views will not involve calling your web service and the Flex client will likely be faster processing the data itself than the extra web traffic
3) Increased availability. Without extra calls to your web service, there is less of a chance of a network failure.