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
0 votes
0 answers
258 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 ...
user avatar
0 votes
1 answer
173 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 ...
user avatar
  • 6,738
1 vote
0 answers
66 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&...
user avatar
  • 869
11 votes
4 answers
6k 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 ...
user avatar
  • 157
1 vote
1 answer
210 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....
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 : ...
user avatar
0 votes
1 answer
852 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 ...
user avatar
1 vote
1 answer
1k 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: ...
user avatar
4 votes
1 answer
6k 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 ...
user avatar
1 vote
2 answers
765 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 ...
user avatar
  • 129