Questions tagged [typecast]

Typecasting is the process of changing the type of a variable into another type. The string "4" has different properties than the number 4 on most computer systems and environments, and casting between types is necessary when you want to be able to use certain properties (like ordering operations) on values of a type that doesn't have the desired properties.

Filter by
Sorted by
Tagged with
1 vote
0 answers
682 views

SQL Server error when creating Geography data from a Multipolygon Geometry

So, in SQL server, I have a table called Municipios, which contains a column with 2463 entries of geometry type, with their SRID set to 4326. I'm running the following Query to try to convert them to ...
Kurt Pelzer's user avatar
1 vote
1 answer
523 views

Cast geography Polygon to MultiPolygon; function st_multi(geography) does not exist

I'm trying to cast a geography Polygon to a MultiPolygon resulting from a 'geographic' intersection with a circle on Earth of a 10'000m radius, but PostGIS is raising this error when using ST_Multi on ...
swiss_knight's user avatar
  • 10.3k
1 vote
0 answers
178 views

ogr2ogr: casting field to string

I am attempting a simple data extraction from an Oracle database to a CSV file using ogr2ogr.exe (the version packaged with QGIS 3.8 i.e. ..QGIS_3.8\bin\ogr2ogr.exe ) I have a field ("Mapsheet&...
grego's user avatar
  • 1,043
14 votes
4 answers
12k views

Converting points to polygons by group

I have a dataframe with around 40 points. They are grouped by an ID variable (their name), which four points in each group. I'm trying to turn these points into polygons, but I've had a lot of trouble ...
cschwab98's user avatar
  • 185
1 vote
1 answer
269 views

Number converted to dictionary in Earth Engine

When reducing an image to number on it's geographical coordinates, the code does return a number, which is what should happen. var accum = ETo.reduce(ee.Reducer.sum()); var accumNum = accum....
Dante's user avatar
  • 13
2 votes
2 answers
2k views

Tile error Google Earth Engine "Some bands might require explicit casts"

I'm getting this error when trying to map the result after calculating the seasonal median NDVI images for a time series with 7 different landsat tiles in Google Earth Engine: Link to the code : ...
user137540's user avatar
0 votes
1 answer
971 views

Measuring distance to two Points in ArcPy?

I would like to know how to measure the distance from two Points in ArcPy? I know only Geometry has the distanceTo method but how do I could make a typecast in ArcPy? I got the following error ...
Ezequias's user avatar
1 vote
1 answer
2k views

Extracting mean values in Earth Engine

I am trying to extract the dates and mean NDVI values of a processed Google Earth Engine image collection thru Python. All goes well until I try to use getInfo(), where I always encounter this error: ...
crftdlve's user avatar
4 votes
1 answer
10k views

How to Cast geometry to Geography in SQL script in MS SQL Server?

I have a Table with some spatial Data in MS SQL Server. The datatype of the spatial column is geometry. I'm trying to get the closest data from an input file using the following query: DECLARE @g ...
Devdatta Tengshe's user avatar
1 vote
2 answers
828 views

CartoDB SQL string as integer

Because data is imported as string, I need to query string values as if they were integers, is there something I could use to cast values to string? Where could I find documentation for this SQL in ...
sites's user avatar
  • 129