Space Time Cube from Defined Locations - Location ID issue

1247
6
Jump to solution
07-29-2022 03:00 PM
ChristineBaver
New Contributor II

I am attempting to use the geoprocessing tool - Create Space Time Cube from Defined Locations. 

My input feature is a point layer (I imported spreadsheet containing lat/long and ID number, used Display XY to create point layer). When I try to select a Location_ID field, it is not auto-populating a drop down of options from my input feature layer. 

Something similar is happening to my related table. My related table is a csv file of production data with date and ID fields. Similarly, when I use the tool, the related location ID is not autopopulating from my related table (csv file). 

When I open the attribute table for both the point layer (input feature) and the cvs file (related table), both contain the location ID numbers that will be used to join the two tables. 

Any suggestion for what I should do differently? I did not perform a join with these tables because ESRI does not seem to like one-to-many joins and it did not seem necessary. 

Following along with a video on https://spatialstats-analysis-1.hub.arcgis.com/

4. Spatial Data Mining II: A Deep Dive Into Space-Time Analysis, on the step shared at 32 minutes. 

Thank you!

0 Kudos
1 Solution

Accepted Solutions
LaurenGriffin
Esri Contributor

If you have leading zeros, your ID field is type text and, sorry, but you won't be able to keep the leading zeros when you convert the field to Integer. If the ID field isn't too long (and all the values are numbers), you should be able to run Calculate Field to create a new field of type LONG; just use the current ID field as the expression (Calculate Field will do the conversion from text to integer for you).

Best wishes! Lauren

BTW, just in case it's helpful, check out this learn lesson

View solution in original post

0 Kudos
6 Replies
LaurenGriffin
Esri Contributor

Only because this has happened to me, make sure your Location ID fields are numeric (rather than text fields). If that's not the issue and you can send me your data, please contact me at LGriffin@esri.com and I'm happy to explore further.

Best wishes,

Lauren Griffin, Esri

0 Kudos
ChristineBaver
New Contributor II

Thank you so much! My ID is likely not numeric. I will attempt to correct this and will report back.

Quick follow up question, many of my ID numbers have leading zeros, do you know if I can keep a leading zero in a numeric format in ArcGIS? I may have to create a new temporary common ID number to work around this. 

0 Kudos
LaurenGriffin
Esri Contributor

If you have leading zeros, your ID field is type text and, sorry, but you won't be able to keep the leading zeros when you convert the field to Integer. If the ID field isn't too long (and all the values are numbers), you should be able to run Calculate Field to create a new field of type LONG; just use the current ID field as the expression (Calculate Field will do the conversion from text to integer for you).

Best wishes! Lauren

BTW, just in case it's helpful, check out this learn lesson

0 Kudos
ChristineBaver
New Contributor II

I was able to create a space time cube! I’m including a list of things I learned through this process in case anyone else got so excited about the space time cube analysis and forgot some basics.  

The geoprocessing processing tool Create Space Time Cube from Defined Locations requires an Input Feature and a related table.

  1. Input Features: I learned that this should be a feature class (at least it worked for me once it was a feature class). Previously, I had attempted to use a layer that I created using the Display XY Data. I was able to create a feature class by inputting my layer (that I initially created by using the Display XY Data tool) into the using the Copy Features tool.

When I initially tried to run the Create Space Time Cube tool with this feature class, I got the error message that This tool requires a projected coordinate system error. To resolve this error, I opened up the tool Project and inputted the feature class that was just created and put in the corresponding projection for my project (in my case, UTM Zone 10N).

I also learned that the field that I was using for my Location ID was not recognized as an integer (ArcGIS recognized my Location ID field as a double). To correct this issue, I opened the attribute table (of the feature class with a projected coordinate system), selected Add to add a new column, entered a name for my new Location ID (that will be in integer/LONG format) and ensured that the data type was equal to LONG. I closed the Fields form and from there, I navigated to the Calculate button. On this form, I inputted the New Location ID (that was just created) under Field name (Existing or New), left Expression Type as Python and then double clicked my old Location ID field in the Field box. After double clicking on my old Location ID, it appears as !OldLocationID! in the text box under the “ = ” sign. I left code block blank. After saving, my new Location ID field populated with the same number that was in my old Location ID field, the only difference is that my old Location ID was in a double format, my new Location ID is in LONG format.

For anyone reading this response very closely, I do want to share 2 additional notes. I think (but have not tried it) the Location ID data format issue could be corrected before creating the feature class or the projected feature class. It just so happened this was the order that I corrected my data.

Also, my original location ID numbers were whole number integers from the beginning, it just so happened that ArcGIS assigned my field as a double and I needed it as a LONG format for the Space Time Cube to accept the Location ID. One may have to follow a different procedure or use a different Location ID if their original Location ID contains decimals or letters. There may be another way to change the data format (maybe without creating a new field?), but this is what worked for me.

  1. Ok, going back to the processing tool Create Space Time Cube from Defined Locations, this tool also requires a related table. I initially attempted to use a CSV file. This did not work because my CVS file did not have an OBJECTID field. I used the Use the Copy Rows tool to copy the .csv file into my file geodatabase. In doing this, an OBJECT ID column was added.

Once I resolved these issues, I was able to create a space time cube and use additional ESRI video resources. Many thanks to the community board and ESRI staff. I did learn a lot from the experience. It also told me that it would be a helpful exercise for me to methodically review all of the tools that ESRI offers. There are some nifty tools on there and observing the themes in the tools might help me better recognize common/expected transformation that occurs when working with data within ArcGIS Pro.

EdwardGause
New Contributor III
I believe Space Time Cube requires Integer for the Id field if I remember correctly, which would cause it to not show up in the drop down if it is not an integer. Since you mention CSV file, more than likely the ID column imported as Text. So you might have to transform it to integer first.
Robert “Edward” Gause, GISP | Director of Information Services | HTC | p 843-369-8483 | www.htcinc.net | This is life. Connet with it.
AroldoRocha
New Contributor II

Its happened when I tryed to create a Space Time Cube from a featureclass. This feature was created from a spreadsheet Excel. My solution was creat a new field for Location_ID and calculate with information from oginal field, in the featureclass. So this way the Locatoin_ID got populated.

0 Kudos