postgresql - Continents/Countries borders in PostGIS (Polygon vs Linestring) -


I would like to include a polygon in Europe in my postgis database.

I have hardcore extreme points:

NW = Northwest border (lat = 82.7021697 lon = -28.0371000)

NE = northmost border (lat = 82.7021697 lon = 74.1357000) SE = South East boundary (Latitude = 33.8 9 78000 lon = 74.1357000)

SW = Southwest Border (lat = 33.8978000 lon = -28.0371000)

The following is a valid polygon:

Polygen ((NWLon NWLat, NELon NELat, SELon SElat, SWLon SWLat, NWlon NWLat))

Is this a valid polygon?

Do I see some polygons with follwing form of polygen ((), ())? When are they used?

Why not do a linestring?

Any help will be apreciated? This is really confusing me.

Thanks

This is a PostGIS polygon:

  ST_GeomFromText ('polygon ((lon1 lat1, lon2 lat2, ... lonN latN))', SRID) where the SRI is in Geometry column talks with you and Lonen Latein should be equal to lon1, lat1, i.e., the ring must be clearly closed.  

In plain postgres, (i.e., no projection data, no background GIS functions can be used with actual latitude and latitude); The syntax for those polygons is:

  Insert some_table (polygon_kalim) values ​​('(1,1), (2,2), (3,4), (1,1)' );  

You may also get this question: relevant.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -