Questions tagged [null]

NULL is a value for an attribute value that contains no data. Sometimes not allowed due to 'not null constraints' or slt.

Filter by
Sorted by
Tagged with
1 vote
1 answer
144 views

Date coming through as NULL when data type is set to "date" in csv/t

If I set the data type to date(DD-MM-YYYY) in the CSVt file the date comes through but as a String/text. But I really need it to be date type. My CSV field looks like this: NAME,DATE,TIME,SPECIES ...
user avatar
  • 21
5 votes
2 answers
126 views

Python error in Update Cursor for ArcGIS: " 'int' object has no attribute 'type' "

I am fairly new to python and am trying to make a script that looks through an ArcGIS feature class and updates <null> values to 'tbd' or 99999 based on the field type (string, double/integer). ...
user avatar
  • 71
4 votes
3 answers
169 views

Nullifying the whole row in data attribute table at once in QGIS

I have a situation as you can see below: and I would like to have one row cleared completely at once. Is it possible?
user avatar
  • 3,574
1 vote
2 answers
62 views

Set NULL values to 0 in specific columns using PyQGIS

I have over 20 fields and I wish to set the NULL values in the final eight fields to 0. I want to be able to do this both with the field calculator and with the PyQGIS console. At the moment neither ...
user avatar
2 votes
1 answer
43 views

Why $x and $y gives some results NULL and other correct values for one point layer? (on one only table of attributes)

I created a point layer starting on lines (with revised geometries) and then tried to obtained the coordinates of several point layers created from the same procedure and also joined all the point ...
user avatar
  • 23
0 votes
0 answers
26 views

Nested for: I execute changeAttributeValue in the outer loop, print it and is still NULL... but inner loop works kind of fine?

A bit hard to explain, untill now my script is: I have a for, where: if an "Analized" attribute is NULL, I will change it to "Parent",store a "Join Value" attribute in a ...
user avatar
3 votes
2 answers
99 views

Getting not NULL values from three columns in one column in QGIS

As you can see, I have three columns with the important features for me (a, b, c, d, e, f) - no matter of size. I want to copy them into new column "name". The problem is when I try to copy ...
user avatar
  • 33
4 votes
1 answer
42 views

QGIS constraint not null depending on another field value

Does anyone know it is possible in QGIS to add a constraint to a field not to be null, only when another field has a certain value. For example I have a field A that can be with value 'foo' or 'bar' ...
user avatar
0 votes
0 answers
50 views

Zonal Statistics results are Null in QGIS

I am relatively new to QGIS and I am having issues with Zonal Statistics. I keep receiving NULL as my results for the median. I am trying to create a map displaying the median temperature for each ...
user avatar
  • 9
2 votes
0 answers
55 views

QGIS raster calculator syntax to turn `nodata` values to other values

In QGIS raster calculator, how is the syntax to refer to nodata values? Lets say I have a raster and want to generate a binary output raster with data -> 1 and nodata -> 0. There is an easy way ...
user avatar
  • 39.9k
0 votes
1 answer
32 views

Replacing zero with no data in CSV file using ArcPy cursor

I have a CSV file with zero as some of the attribute values. Trying to use cursors and replace all zeros with no data or blank values. I am able to replace any numbers. But not able to update with ...
user avatar
  • 1
0 votes
0 answers
16 views

Infill missing values of single-beam data with multi beam data using gdal and python

I have a multibeam survey of an area in xyz format. Similarly, there is a single-beam survey of the area in xyz format. The single-beam data has some NULL values in it, in which I'd like to take the ...
user avatar
1 vote
0 answers
25 views

How to avoid default_value in field with ArcPy cursor (e.g. row[i]=None)

Some field in field_list has default_value=1 After executing the following code, such field is filled with the value «1», but normal fields are filled «Null». How could I avoid this for the field (...
user avatar
0 votes
1 answer
49 views

SearchCursor from source TEXT field set as <Null> being interpreted as ' ' (writing to DOUBLE)

I am Curious about the behaviour of the SearchCursor on a server Database feature class. the data for some of the the fields I want to read is set as TEXT, with some of those fields values set as <...
user avatar
6 votes
2 answers
356 views

Concatenate multiple fields where some contain null values (QGIS)

In QGIS 3.18. In a shapefile attribute table, I need to create a field that concatenates several other fields with a comma delimiter. Some of those fields are NULL. Currently my approach has been ...
user avatar
  • 1,001
0 votes
0 answers
28 views

Why is attribute table of my imported MIF file is showing null values in QGIS?

I am facing an issue regarding importing MIF files into QGIS 3.16.8. The files are imported but the attribute table of the imported MIF file is showing null values. I have updated the CRS of the MIF ...
user avatar
0 votes
0 answers
23 views

GRASS QGIS v.vect.stats returns NULL for all polygons

I'm running v.vect.stats from Grass using the processing toolbox in QGIS to take an average of a point layer attribute for points falling within a set of polygons. After running the algorithm a ...
user avatar
  • 133
3 votes
1 answer
68 views

Filtering NULL values in date field in QGIS [duplicate]

In QGIS 3.16.9 I would like to find all the locations that have a NULL value. It is for a date field in the field services Drains dataset. I have been searching the use of NULL around various forums. ...
user avatar
1 vote
1 answer
63 views

Using .CSV file as an external dictionary, but can't find a way to reference/make a key for Null in order to assign it a value using ArcPy

I am using ArcGIS Desktop: ArcMap 10.8.1 and using Python 2.7.18. I have a script that uses a .CSV file as an external dictionary (opposed to creating a dictionary within the script) but I cannot find ...
user avatar
0 votes
0 answers
33 views

Deleting/removing null rasters using ArcGIS Pro

I'm trying to slim down files to export from ArcGIS Pro to CAD. I clipped a raster image file to a project centerline buffer and now the extent is boxed around my buffer feature and the the only ...
user avatar
  • 1
0 votes
1 answer
230 views

What VBScript can I use to populate a field with text using the ArcGIS field calculator?

I need to populate one field in the attribute table of a File Geodatabase with text. Every entry in the field is set to a Null value and text entry isn't conditional upon any other factor. Every entry ...
user avatar
  • 93
4 votes
1 answer
192 views

Concat fields which are not NULL

I am using the concat function in QGIS 3.16.6 on Mac. I want to join several cell values into one new cell. With the concat function it is ignoring cells with NULL but it doesn't separate the cell ...
user avatar
  • 41
3 votes
1 answer
54 views

Changing 'NULL' value to '0' in label formula

I have a label formula in QGIS that shows the name of a polygon and the remaining km of survey left to do: "Name" || '\n' || round("Length_km_sum", 2) But when I have an area ...
user avatar
2 votes
1 answer
46 views

QGIS displays NULL values as zero in the layout tables

I use QGIS 3.18.2-Zürich to display the table in layout mode. My table contains two fields of type Double. If I set the values to Null (None), a zero is displayed instead of an empty cell. What should ...
user avatar
  • 5,592
2 votes
1 answer
99 views

GeoPandas imports NULL attribute values as zeros from shapefile

I would read a shapefile as GeoPandas DataFrame using: import geopandas as gdp df = gdp.read_file('file.shp') When I read the file, the NULL values have been loaded as zero. I need to see and ...
user avatar
  • 65
10 votes
1 answer
155 views

Selecting NULL or date values by Expression in QGIS

How can I select by expression from a date field in a shapefile, dates that are NULL or >= 2020-01-01? This doesn't work, it only selects those with dates >= 2020-01-01, not the NULLs "...
user avatar
  • 51.1k
1 vote
0 answers
42 views

Changing null / no data values [duplicate]

I have a raster where null values are stored as -9999. I want to change these to 0. Googling suggests this can be done in the raster calculator, but e.g. (layer name = -9999) * 0 doesn't work. And ...
user avatar
  • 63
1 vote
1 answer
59 views

Getting multiple column values at the same time in QGIS using Python

I need to filter multiple column values using python in QGIS. I am facing issue while writing expression using QgisExpression(qgis.core). If one of the column values is NULL then also I need to get ...
user avatar
0 votes
0 answers
48 views

How to handle NULL values in QgsExpression()?

When I try to add multiple conditions in QgsExpression() eg: QgsExpression(f"input='{abc}' OR value='{def}'") here abc = 1 and def = NULL. Even though abc is having value I am getting NULL ...
user avatar
0 votes
0 answers
77 views

QGIS field-calculator time formating produces NULL

I'm struggling to format a QString attribute field to a DateTime or Date field. I've been trying the built in functions to_date to_time to_datetime of QGIS 3.10.14 and none of them seem to do the ...
user avatar
  • 115
1 vote
1 answer
129 views

Tried to Mosaic Sentinel 2 images but my final image appeared with some overlapping Null data

I'm working on an area that required me to use three sentinel images to fully cover it, I used the "mosaic to new raster" tool in ArcGIS to merge the three images and was surprised to find ...
user avatar
1 vote
1 answer
701 views

Calculating only values that are not null in field using ArcGIS Pro

I'm using ArcGIS Pro, the field calculator. I want to populate a hydrant layer with hydrant inspection data. I have two fields from a joined table: field 1 and field 2. I want to populate field 1 ...
user avatar
  • 787
0 votes
0 answers
38 views

Tabulate intersection, but I need it with null values too, not just with matching intersect

I have problem with tabulate intersection tool (In ArcGIS - ArcMap 10.7.1). The number of data is 1298 with 500 m buffer. Then i have polygons, that I need to process. I run the tool, but get the ...
user avatar
  • 1
0 votes
0 answers
79 views

QGIS Vector Geometry Vanished

I've been working on a project, in QGIS 3.16 Hannover (we started the project a while ago, in the Bonn version, but upgraded during the duration of project). Upon project completion we've been asked ...
user avatar
  • 123
0 votes
1 answer
42 views

Replacing Null attribute with the value of the nearest feature

I have several polygons with "Null" values that I would like to give them the "Name' of their nearest polygonal feature. As you see in the photo, the light green polygon is actually a ...
user avatar
  • 15
1 vote
1 answer
101 views

Adding two fields in attribute table and assigning result to third field if some cells contain null values using ArcGIS Pro Field Calculator

I am using ArcGIS Pro, field calculator to add the values of two fields (Result_A and Result_B) and assign the value to new Field Combined_Result. The type for all three fields is "double". ...
user avatar
  • 43
2 votes
1 answer
53 views

When calculating a field in an attribute table, how can I find one value out of many fields when every other field has a null value?

I have 4,018 rows of data with about 50 fields. About 45 of those fields are the same variable, but the data came from different layers, so out of those 45 fields, only one has a value for the row, ...
user avatar
  • 23
5 votes
1 answer
90 views

Fill combobox with NULL values in PyQGIS

I'm writing a plugin that has a form with a combo box that I fill with the unique values in a field of a vector layer in the project. The problem is that there are NULL values in that column and I get ...
user avatar
4 votes
3 answers
340 views

Replacing all "NULL" values in multiple rows with "0"

I am looking for a way to replace all "NULL"-Values throughout multiple rows/ all "NULL"-Values in an attribute table. The table is from a SHP-File (shapefile). Is there any easy ...
user avatar
2 votes
1 answer
41 views

Count Blanks, Spaces, and Hardcoded Nulls

I want to get counts of Blanks, Spaces, and Hardcoded Nulls in fields using arcpy.SearchCursor. Is it possible? When I try to filter am getting None values only. I tried the below code. cursorfields ...
user avatar
-1 votes
1 answer
69 views

Removing 0 (NODATA) from Combochart in FeatureCollection in Google Earth Engine [closed]

I'm trying to make a combo chart based on two properties of a FeatureCollection. However, one of the properties is full of 0 which I don't want to show them on the chart. How can I not showing those ...
user avatar
1 vote
0 answers
134 views

AGOL "Update Data" from Excel import numeric columns with some NULL rows?

I need to append some new features into an ArcGIS Online hosted feature layer. The data has been supplied to me in an Excel file (including X/Y columns). I was intending to import it as-is using the ...
user avatar
1 vote
0 answers
49 views

Problem with containers in combination with the remember button

I've been searching for a solution for days. I'm using QGIS 3.14.15 on Windows 10 and created a point layer to take points with QField. I created a container with several options. In QField the ...
user avatar
1 vote
0 answers
57 views

QGIS: How to avoid using coalesce() in GPKG query layer for correct type casting?

I query the following layer via DB Manager: select fid, geom, cast((field2*100/field1-100) as double) as dev from table field1 and field2 are integers and have NULL values. Now in the DB manager's ...
user avatar
  • 922
2 votes
1 answer
258 views

QGIS: Change attribute values from NULL to 0 for all attributes using Python [closed]

I have an attribute table where I have occurrences of NULL spread throughout in different attributes and features. How can I change NULL to 0 using Python for all attributes?
user avatar
  • 199
1 vote
1 answer
785 views

Earth Engine, how to convert 0 pixel values to transparent or nodata?

I'm using the following snippet to convert canny edges to black and white to highlight boundaries. However, I want to fill the black area with transparent or NODATA, is there a way to do this in EE? ...
user avatar
2 votes
1 answer
592 views

Count number of NULL values per region in Google Earth Engine

Following a previous post I now have some code which sets null values in an image collection to zero. I have used this code on several variables, however, I'd like to know which variables have NULL ...
user avatar
1 vote
1 answer
1k views

Google earth engine - set null band values as zero

I have a function which assigns a score depend on the value of a band, which I then map to an image collection. However, in some cases, I have null values, where no value is given. In these cases I'd ...
user avatar
1 vote
2 answers
531 views

PyQGIS: Inline function to replace NULL values with 0 in all fields (not coalesce)?

Now I know there are several ways to tackle this problem but so far none of the following worked for me. I got a huge attribute table out of various spatial joins so pretty much all of the fields have ...
user avatar
  • 922
0 votes
1 answer
104 views

How to set all raster pixels within a shapefile to null?

I'm working with ArcGIS Pro 2.4.0. I have a raster dataset consisting of several plots of crops. Within each plot, there is a small ground target that has differing reflective values than the ...
user avatar
  • 453