|
POST
|
For me the empty cells would be null, lot's depends on how the database/tables have been defined... Using the old VBA scripting language this was never an issue...but with python (I have to check for everything!) Not to mention unprintable control characters.... but this is off subject...... I am a very reluctant python users.... vb rest in peace!
... View more
11-03-2016
10:18 AM
|
0
|
5
|
3436
|
|
POST
|
What happens when there are multiple spaces...... Would not [PLAN].strip() in (None, "") work better and a little more bullet proof? ------ I still say Python has issues with nulls, empty, NA and spaces ....
... View more
11-03-2016
08:10 AM
|
1
|
7
|
3436
|
|
POST
|
A down and dirty way: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0ahUKEwjG67W84YfQAhVGyyYKHRwKDS4QFgglMAE&url=http%3A… Use the formula in the excel sheet .... "Note this is only a very rough approximation!" Lat long is highly dependent upon the curvature of the earth which varies from location to location" A more complex way answering your question would be to write a script that determines the shortest distance to a point representing a cities that have been filtered to meet your requirements In scripting this ... look at the material Darren Wiens gave and Generate Near Table—Help | ArcGIS for Desktop A set of tools from SpatialEcology (Donation Ware) I highly encourage support if you find them useful! Has tools that will assist in finding distance between two points.... GME | SpatialEcology.Com
... View more
11-01-2016
07:46 AM
|
0
|
0
|
890
|
|
POST
|
Here are some publications with lots of information and contacts to assist you in designing a better schema for your data.... Best Practices in Geographic Information Systems-based Transportation Asset Management | Federal Highway Administration … Proposed features/sidewalk schema - OpenStreetMap Wiki
... View more
11-01-2016
07:20 AM
|
0
|
0
|
3014
|
|
POST
|
In case people are not aware: Excel determines numeric/date/text columns based upon some first number of rows -- There is nothing inside excel you can do with this behavior. For this reason, I always export the data as text to Access then format as necessary. If it is data I have to deal with alot then I make template access tables with correct formatting. A word to the wise -- Never trust an excel export or link!
... View more
10-28-2016
09:20 AM
|
1
|
4
|
4252
|
|
POST
|
Your question is very broad and hard to answer in a meaningful context... I would suggest to search and read up on Corridor analysis? For Highway Engineering this is a good reading site for analyzing roads... Corridor Analysis
... View more
10-28-2016
08:45 AM
|
1
|
0
|
1842
|
|
POST
|
I have attached a mdx and personal database that has 75 of your columns seperately exported and re-attached in GIS in various of ways: 1. with joins 2. as an exported feature class containing all of the columns This was using the same technique as a described earlier.
... View more
10-28-2016
08:34 AM
|
1
|
0
|
3014
|
|
POST
|
I agree with all that was stated in the chain --- bad design -- however I feel pain sometime your stuck dealing with issues like this.... I can give you a technique I use when dealing with large amount of columns..... Export in multiple passes with smaller number of columns... First create a numeric column in your spread sheet and fill it with sequential numbers ending with your last row this will be you "own" uniqueId -- call it MYID now export MyID, col 1-25 as a table in access -- export MyID, col 26-50 -- and so on as a table in access. Now you can manipulate your data within a real database.... In GIS you can join the tables based upon "MYID' and recreate the 250+ columns of data
... View more
10-28-2016
08:07 AM
|
0
|
0
|
3014
|
|
POST
|
Speak of the devil..... i have just received last years crash data from the state.... it is in an excel spread sheet as with every year. After getting frustrated with excel, I simply import the data into an empty personal geodatabase and then create a feature or feature class from the access table..... a lot less of a hassle and keeps the data intact! -- aside-- If your crash data is coming from your state DOT -- generally there is LRS information within the data ie the Route and Milepoint. If you obtain the state route (LRS) line work you can event map the crash data directly with the route number and milepoint........ which makes life a heck of alot easier!
... View more
10-28-2016
07:55 AM
|
0
|
0
|
2404
|
|
POST
|
I have not dealt with that specific problem, but I am working with SQL server with features converted to text strings (WKT) and mapping them over Bing Maps. SQL server stores the X,Y coordinate opposite of the way the Bing Maps API needs them, and a few other parens "()" formatting issues.... so I created a class in vb.net to rewrite the WKT stored in SQL Server flipping the XY coordinates on the fly.... Hopefully this will give you some ideas? Imports Microsoft.VisualBasic
Namespace TSK.GML2VE
Public Class GML2VE
Private mGML As String = ""
Private mFeatureType As String = ""
Private mShapeID As String = ""
Private mFID As Integer = 0
Public Property ShapeID() As String
Get
Return mShapeID
End Get
Set(ShapeID As String)
mShapeID = ShapeID
End Set
End Property
Public Property FID() As Integer
Get
Return mFID
End Get
Set(FID As Integer)
mFID = FID
End Set
End Property
Public Property GML() As String
Get
Return mGML
End Get
Set(GML As String)
mGML = GML
End Set
End Property
Public Property FeatureType() As String
Get
Return mFeatureType
End Get
Set(FeatureType As String)
mFeatureType = FeatureType
End Set
End Property
Public Function VE() As String
If mGML = "" Or mFeatureType = "" Or mShapeID = "" Then
Return "Set GML, Feature Type"
Else
Dim WKT As String = ""
Dim Output As String = ""
Dim VEGM As String = ""
Select Case mFeatureType
Case "Point"
'Get the WKT representation of the object
WKT = mGML
'Replace the double brakets that surround the coordinate pair
WKT = Replace(WKT, "POINT (", "")
''Remove the closing double brackets
WKT = Replace(WKT, ")", "")
'Build the Pushpin/GMarker object from the coordinates
VEGM = ""
Dim Coords() = Split(Trim(WKT), " ")
VEGM = VEGM + "new VELatLong(" + Coords(1) + "," + Coords(0) + ")"
Output += "var " + mShapeID + "=new VEShape(VEShapeType.Pushpin, " + VEGM + ");"
Case "LineString"
'Get the WKT
WKT = mGML
'Remove the Line String definition and opening bracket
WKT = Replace(WKT, "LINESTRING (", "")
'Remove the last bracket
WKT = Replace(WKT, ")", "")
'Create an Array of each point in the LineString
Dim PointArray() As String = Split(WKT, ",")
'Loop through each point in the array
Dim i As Integer = 0
While i <= PointArray.Length - 1
'Split the pint into individual coordinates
Dim Coords() = Split(Trim(PointArray(i)), " ")
'Build an array of the equivalent point definitions
VEGM = VEGM + " new VELatLong(" + Coords(1) + "," + Coords(0) + "),"
'Go on to the next point
i = i + 1
End While
'Remove the trailing comma
VEGM = Left(VEGM, VEGM.Length - 1)
Output += "var " + mShapeID + "= new VEShape(VEShapeType.Polyline, [" + VEGM + "]);"
'Do Text and pretty stuff
Case "Polygon"
'Get the WKT representation of the object
WKT = mGML
'Replace the double brackets that surround the coordinate point pairs
WKT = Replace(WKT, "POLYGON ((", "")
'Remove the closing double brackets
WKT = Replace(WKT, "))", "")
'Create an array of each point in the Polygon
Dim PointArray() As String = Split(WKT, ",")
'Build the appropriate VE/GMaps Polygon object from the coordinates
VEGM = ""
Dim i As Integer = 0
While i <= PointArray.Length - 1
Dim Coords() = Split(Trim(PointArray(i)), " ")
Coords(0) = Coords(0).Replace("(", "")
Coords(1) = Coords(1).Replace(")", "")
VEGM = VEGM + "new VELatLong(" + Coords(1) + "," + Coords(0) + "),"
i = i + 1
End While
'Remove the last trailing comma
VEGM = Left(VEGM, VEGM.Length - 1)
'Add the constructor for the Polygon, and apply styling options
Output += "var " + mShapeID + "=new VEShape(VEShapeType.Polygon, [" + VEGM + "]);"
End Select
Return Output
End If
End Function
End Class
End Namespace
... View more
10-19-2016
01:22 PM
|
1
|
0
|
1061
|
|
POST
|
Like Darren Wiens mentioned filtering or modify my script above to return a blank string for the label (this happens when enabled is true -- actually it would happen if enabled is anything else except false) vbscript Else FindLabel = "" --------------------------------- Python else: return ""
... View more
10-19-2016
10:25 AM
|
0
|
0
|
1723
|
|
POST
|
Only one field is necessary? Vbscript Function FindLabel ( [Enabled] )
if [Enabled] = "False" then
FindLabel = "ALERT"
else
FindLabel = "Enabled"
end if
End Function or Python def FindLabel ( [Enabled] ):
if [Enabled] == 'False' :
return "ALERT"
else:
return "Enabled"
... View more
10-18-2016
10:19 AM
|
1
|
3
|
1723
|
|
POST
|
I have done something similar in SQL Server.... the code may differ slightly but the concept should be the same.... I buffered (in my case points in order to account for the "nearby")..... Hopefully this will be helpful! USE [GeoTest]
GO
/****** Object: StoredProcedure [dbo].[usp_MDXLights_Intersection] Script Date: 10/17/2016 11:02:05 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Ted Kowal
-- Create date: 2/1/2015
-- Description: Get Lights within a bounding area
-- =============================================
ALTER PROCEDURE [dbo].[usp_MDXLights_Intersection]
-- Add the parameters for the stored procedure here
@latitude float,
@longitude float,
@BufferSize float
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
Declare @Point geography
SET @Point = geography::Point(@latitude,@longitude, 4326)
-- Use STBuffer() to greate a buffer around the point to BufferSize in Feet
Declare @SearchArea geometry
Declare @G geography
-- This was done using Geometry (Have not been able to get it working using
-- Geography)
Set @G = @Point.STBuffer(@BufferSize *.3048)
-- Convert Search Area to Geometry from Geography
Set @SearchArea = geometry::STGeomFromWKB((Select @G.STAsBinary()), 4326)
-- Select any lights that intersect the search area
Select
Shape.STGeometryType() as GeometryType,
Shape.STAsText() as WKT,
'Light ID: ' + LSAIT as Title,
'Pole Type: ' + dPoleType + '<br/>' +
'Fixture: ' + dFixtureType + '<br/>' +
'Support: ' + dSupportType + '<br/>' +
'Number of Lights: ' + cast(NumberLights as nvarchar(5)) + '<br/>' as Description,
MDXLights.FixtureType as FT
From
MDXLights INNER JOIN
lkLightsFixtureType ON MDXLIGHTS.FixtureType = lkLightsFixtureType.FixtureType INNER JOIN
lkLightsPoleType ON MDXLIGHTS.PoleType = lkLightsPoleType.PoleType INNER JOIN
lkLightsSupportType ON MDXLIGHTS.SupportType = lkLightsSupportType.SupportType
Where
Shape.STIntersects(@SearchArea) = 1
-- Also select the search area itself
Union ALL Select
@SearchArea.STGeometryType() as GeometryType,
@SearchArea.STAsText() as WKT,
'Search Area' as Title,
cast(@BufferSize as nvarchar(5)) + 'foot Search radius' as Description,
cast('100' as int) as FT
END
... View more
10-17-2016
08:14 AM
|
0
|
1
|
1794
|
|
POST
|
or perhaps cat = Reclass(int(!cat!)) # --- If you need to use the cat value and overwrite the string number with text
# --- Then you would also have to account for possible non numbers text in the Reclass def?
... View more
09-29-2016
07:43 AM
|
0
|
1
|
1775
|
|
POST
|
ArcGIS RunTime does not have it but in every Window installation SAPI.DLL is installed and that can be used to create a very fundamental voice by text. Below is a picture a very simple VB.Net project, I am using the SAPI.DLL reference to early bind but I also include the late binding technique. The program will simply "Say" what is in the text box. I have it as a sub, but could be easily incorporated within a class/object.
... View more
09-28-2016
09:08 AM
|
2
|
0
|
1278
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-18-2018 09:46 AM | |
| 1 | 05-23-2018 08:30 AM | |
| 9 | 04-18-2019 07:15 AM | |
| 1 | 05-04-2016 08:15 AM | |
| 1 | 03-24-2017 01:22 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-18-2023
06:40 PM
|