1

I found this error 3D geometrics not rendered in view data (pgAdmin 4). In GeoDjango I've updated my PointField model with dim=3. After successful migration, I cannot see my data in map.

My Django Model is:

from django.db import models
from django.contrib.gis.db import models as gis_models
from django.db.models import Manager as GeoManager

class Location(models.Model):
    lat_long = gis_models.PointField( srid=4326, null=True, spatial_index=True, geography=True, dim=3)

    class Meta:
        db_table = 'location'

enter image description here

  • 1
    I think you are going to have to give a lot more information for someone to help you. What does you data look like, for a start? Are you following some tutorial? Did it work before? – John Powell Jul 18 at 16:44
  • Welcome to GIS SE! As a new user please take the tour. You can edit your question to add additional info such as details about your data, any screenshots that may help explain your problem, what you've tried etc. – Midavalo Jul 18 at 17:00
  • Hi @JohnPowell I'm completly new to this field (gis) and in Postgres as well. I've just created a PointField in django model and changed dimension to 3(To store altitude as well). While view data in pgAdmin i got this error. I'm not following any specific tutorial. I'm learning by search. – I am Dev Jul 18 at 17:06
  • pgAdmin was not designed for 3D geometry viewing. There are countless tools for this. A couple of suggestions, cesiumjs, in a web environment or matplotlib in Python. – John Powell Jul 19 at 8:16
  • You can always use ST_Force2D to create another column for viewing purposes, which will at least allow you to see the 2D extent of your geometries. – John Powell Jul 19 at 12:25