|
POST
|
moving data to fgdb indeed fixed the problem. I've tried to export data back to shapefile and the test passed. It seems that export/import function fixed the data but I don't how. I still have my issue as I'd like to avoid the export phase... Any number of things could be wrong, point shapefiles are fairly simple so it is often null shapes that are the problem. Line and polygons often have bad geometries. The shapefile is a published format so any software write or edit shapefiles, not all of it does it well. This has lead to many corrupt or partially corrupt shapefiles. If you google "fix shapefile" or "repair shapefile" or "Corrupt shapefile" you will find many links to different strategies of repairing the shapefile.
... View more
03-07-2013
04:40 AM
|
0
|
0
|
1773
|
|
POST
|
I still think the user of string.format would avoid all this concatenation complexity.
... View more
03-06-2013
04:20 AM
|
0
|
0
|
5826
|
|
POST
|
The only reason was to be in the same format as the date field. yyyy-MM-dd, hey, if I don't have to convert it to string and back to a date field great. I was using toDate = frmTech1.ToDatePicker.Value.ToString("yyyy-MM-dd"). So i shouldn't mess with format and leave it alone and sql server will format it correctly, is that what your saying? So it should be toDate = frmTech1.ToDatePicker.value and the where clause would be what exactly? I don't think that would work... I would think either you will get a type mismatch or the string returned by to the date picker will be whatever your locale is set which may or may not be wrong. There are two issues here, the conversion of the .net datetime type to string and the conversion from string to the sql server datetime (or date, datetime2) format in sql server. The .net tostring function is compiled when the .net code is compiled and executed on the local client at run time. The where clause is then passed as a string to a sql server database (local or on a server) which interprets and executes the sql where clause. In order to go from one the the other, you need a string in between to pass (whereclause.) The format of the string sql server needs will dictate what format the string you need to make from the .net datetime tostring function. Do you know the format the sql server needs to take in? Can you use a t-sql convert function in the where clause specifying the type of string (sql server's way of specifying the format)?
... View more
03-04-2013
09:56 AM
|
0
|
0
|
4465
|
|
POST
|
I have done it with lines and at 9.3 and migrated to 10.0. I have done it with polygons at 8.3. In 9.3, I created a new edit task. In the task activate you can set the sketch geometry to polygon. You then can use the sketch tools like any other polygon, pan, zoom, etc. On finish sketch, you can do whatever you need to do. In ArcGIS 10.0 and up, you should look at IShapeConstructorTool and ISketchTool. You can similarly create a task to edit a polygon using the edit sketch ArcMap GUI goodness. Even if the end goal is not to store the polygon in a featureclass, the types of functionality you describe are achieved via the edit sketch. The edit sketch is created or modified via sketchtools or edittasks. There are many topics associated with customizing the edits in the help.
... View more
03-04-2013
08:24 AM
|
0
|
0
|
1401
|
|
POST
|
Not sure this is 100% what you want. It shows how to get the difference between a child and parent version. Keep in mind some differences can happen because the parent version has changed and not the child (if parent has multiple child version or editing directly to it for instance. http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#/d/00010000021t000000.htm
... View more
03-04-2013
04:49 AM
|
0
|
0
|
467
|
|
POST
|
I am not sure why you want to take a date and convert it to a string and convert it back to a date... Where clauses take strings, sql server will convert it back to a date to do its query internally.
... View more
03-04-2013
04:31 AM
|
0
|
0
|
4465
|
|
POST
|
Looks like you are missing a single quote in the concatenation. The way you build the where clause is very difficult to read and somewhat inefficient. Each time you concatenate two strings it declares a new string, so the line bellow declares 13 new strings in memory... "InspectionDate > " & vFrom & " " & "00:00:00" '& " " & "AND" & " " & "InspectionDate < " & vTo & " " & "00:00:00" & " " & "AND" & " " & "FieldTechnician" = "Tech" I prefer using the string.format function, in vb.net it looks like this (sorry it has been a little while since I last did C#) string.format (InspectionDate > '{0} 00:00:00' AND InspectionDate < '{1} 00:00:00' AND FieldTechnician = {2}", vFrom, vTo, Tech) In my experience it is a lot easy to spot syntax problems in a statement like that than some long series of &. Another thing, you can pick up the hours, minutes and seconds in the datetime of the picker to string: ToDatePicker.Value.ToString("yyyy-MM-dd HH:mm:ss") Makes the where clause a little easier too.
... View more
03-01-2013
09:13 AM
|
0
|
0
|
4465
|
|
POST
|
Additional info: the code does work when the input data are placed into a File Geodatabase (not in a Personal GDB!) Sounds like moving the data to the fgdb 'fixed' it. If you move the data back to a new personal geodatabase, does it work? Export/Import functions sometimes fixes bad data. Also check the version numbers in the pgdb properties. You need to update 9.x pgdb to 10.x. If the pgdb still doesn't work and the fgdb does, in my opinion, it suggests a bug in the esri code. In that case, only esri technical support will be able to help you with that.
... View more
02-26-2013
04:44 AM
|
0
|
0
|
1773
|
|
POST
|
Alexander, I'm trying your suggestion but it seems like the Enabled event on a command is not fired when the parent toolbar is not visible. No the enabled is only fired when the command is visible... That won't work if the command is on the toolbar you want to assess the visibility... The event stops firing precisely when you want to check... It has to be on a different command bar.
... View more
02-22-2013
07:45 AM
|
0
|
0
|
1478
|
|
POST
|
You can't convert meters to degrees. Degrees are an angular unit and do not have a constant length. Degrees of Latitude are roughly constant, the distance between the north pole and the equator along the greenwich meridian is approx. 10 000 000 meters /90 degrees. A degree of longitude varies from approx 44 000 000/360 at the equator to 0 at the poles. If you want to buffer one meter around a point that is defined in geographic units, I suggest you project the point into a projected coordinate system defined in meters (hopefully one that minimizes distortion for that part of the globe) and buffer one meter and reproject the output back to geographic if need be. I think the geodesic based buffers are basically the same idea. Looks like the units you set are not correct. Geographic are angular units yet it looks like you are using a linear unit with a meter to unit ratio as one (so basically redefining meters.) You can specify the buffer distance in a distance unit different than that of the spatial reference of the input geometries. The unit must be of the same type (angular or linear) as that of the input geometries' spatial reference. I am not sure how you then define the buffer distance as a linear unit if the spatial reference of the input point is an angular unit.
... View more
02-19-2013
11:25 AM
|
0
|
0
|
11089
|
|
POST
|
I have seen something similar done in a very cludgy way. Basically, if the event doesn't exist you can make your own. I have seen commands placed on an interface for the sole purpose of taking advantage of the enabled property being fired basically all the time. In the enabled property they place a check to the desired command bar isvisible property and raise a custom event if it changes. The reference to the command bar was obtained only once. Like I said cludgy but some times you have little choice.
... View more
02-19-2013
10:08 AM
|
0
|
0
|
1478
|
|
POST
|
Does it work through ArcMap GUI methods with the same data? If so you might get a better error message. Sounds like a data problem to me. Is there anything unusual about the raster (no-datas, spatial ref, outliers etc?)
... View more
02-19-2013
04:45 AM
|
0
|
0
|
1773
|
|
POST
|
You can get the styles from the registry. In 10.0 it is under HKEY_LOCAL_MACHINE\Software\ESRI\Desktop10.0\CoreRuntime\StyleDir. I assume desktop 10.1 has something very similar. The main annoyance of using that method is you would have to update the code every time you changed version... You might be better off getting a reference to the ArcMap.exe through .net reflections which gives you the path to the bin directory and work your way back to styles. Of course if esri changes the location in a future version, that won't work either.
... View more
02-19-2013
04:40 AM
|
0
|
0
|
3348
|
|
POST
|
It depends on your application but you should be able to pass the data source (full path to raster or raster object) to the GP tool as an alternative to the layer name. More of a workaround than a solution.
... View more
02-15-2013
04:19 AM
|
0
|
0
|
837
|
|
POST
|
Right now we have a separate DB group who manages the majority of the City's databases. Then we have our SDE databases. What the overall intent is, is to have the SDE databases on our own SQL Server instance apart from an instance that currently has not only our databases, but other databases in the same instance of SQL Server. In addition, the idea was to also separate out the license manager and all ArcSDE components to its own server, separate from the database server. I don't view any of that being an issue as ESRI supports the separation of ArcSDE from SQL. However, what I am trying to trouble shoot is all the peripheral montage that comes with it. Prior to our separation (or if you would like, still currently in production) are numerous SQL jobs that we run on a nightly, weekly, and monthly basis. These jobs can include SSIS packages, .exes, and python scripts. The idea was to take these "GIS-oriented" pieces and put them on the ArcSDE server (not the database server), so everything is in one (a GIS Server/non-database) location and let the jobs continue to run, but call the .exes from a different location. It seems to work just fine (on other .exes) until I get to the "GIS" executables. This is the direction management wanted to head, so I get to figure it out.....I did modify the reference paths in the .exe to use a universal naming convention so it should be able to access the .dlls on the other server, I would think. Still at a loss.....it almost seems like something very small..... Richards post is right the dlls must be installed on the server calling the exe, he gets the points. I am not sure why you need an ArcSDE server at all. ArcGIS desktop, server, engine do direct connect to the database server very well. All you need is the Geodatabase/arcsde schema installed on your database, you don't actually need ArcSDE running. Your ArcSDE server could become your GIS server with the ArcGIS components installed. In any case you will need to figure out how to launch the jobs remotely from the database server to the GIS server. You could have a service running on the GIS machine that looks to a job queue and have the database server place a request in that queue to launch a specific exe with specific arguments, that could be as simple as a file placed in a folder on the remote GIS server. There are other ways of making remote calls too that are worth investigating before implementing anything.
... View more
02-13-2013
05:04 AM
|
0
|
0
|
2742
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-02-2024 10:26 AM | |
| 1 | 07-05-2024 08:45 AM | |
| 1 | 10-05-2022 02:19 PM | |
| 6 | 03-27-2017 01:16 PM | |
| 1 | 05-05-2016 05:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-28-2025
07:37 AM
|