4D Data in GeoJson in PostGIS
up vote
0
down vote
favorite
I'm trying to store 4-D data ("LINGSTRING ZM") in Postgres/PostGIS, and it seems that GeoJson loses 4-D data:
select ST_AsText(ST_GeomFromGeoJSON('{"type":"LineString","coordinates":[[1,2,3,4],[4,5,6,7],[7,8,9,9]]}'))
Yields: "LINESTRING Z (1 2 4.65371818235691e-310,4 5 4.65371818235691e-310,7 8 4.65371818235691e-310)"
. And If I'm going WKT all the way, it works just fine.
Is this a problem with GeoJson definition? With PostGIS support of GeoJson?
Versions:
"POSTGIS="2.1.2 r12389" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="UNKNOWN" RASTER"
"PostgreSQL 9.3.24 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4, 64-bit"
postgis geojson 4d
add a comment |
up vote
0
down vote
favorite
I'm trying to store 4-D data ("LINGSTRING ZM") in Postgres/PostGIS, and it seems that GeoJson loses 4-D data:
select ST_AsText(ST_GeomFromGeoJSON('{"type":"LineString","coordinates":[[1,2,3,4],[4,5,6,7],[7,8,9,9]]}'))
Yields: "LINESTRING Z (1 2 4.65371818235691e-310,4 5 4.65371818235691e-310,7 8 4.65371818235691e-310)"
. And If I'm going WKT all the way, it works just fine.
Is this a problem with GeoJson definition? With PostGIS support of GeoJson?
Versions:
"POSTGIS="2.1.2 r12389" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="UNKNOWN" RASTER"
"PostgreSQL 9.3.24 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4, 64-bit"
postgis geojson 4d
1
Read the second comment on this question. According to RFC 7946 “Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp (...) additional elements MAY be ignored by parsers.”
– thibautg
Nov 22 at 8:26
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to store 4-D data ("LINGSTRING ZM") in Postgres/PostGIS, and it seems that GeoJson loses 4-D data:
select ST_AsText(ST_GeomFromGeoJSON('{"type":"LineString","coordinates":[[1,2,3,4],[4,5,6,7],[7,8,9,9]]}'))
Yields: "LINESTRING Z (1 2 4.65371818235691e-310,4 5 4.65371818235691e-310,7 8 4.65371818235691e-310)"
. And If I'm going WKT all the way, it works just fine.
Is this a problem with GeoJson definition? With PostGIS support of GeoJson?
Versions:
"POSTGIS="2.1.2 r12389" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="UNKNOWN" RASTER"
"PostgreSQL 9.3.24 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4, 64-bit"
postgis geojson 4d
I'm trying to store 4-D data ("LINGSTRING ZM") in Postgres/PostGIS, and it seems that GeoJson loses 4-D data:
select ST_AsText(ST_GeomFromGeoJSON('{"type":"LineString","coordinates":[[1,2,3,4],[4,5,6,7],[7,8,9,9]]}'))
Yields: "LINESTRING Z (1 2 4.65371818235691e-310,4 5 4.65371818235691e-310,7 8 4.65371818235691e-310)"
. And If I'm going WKT all the way, it works just fine.
Is this a problem with GeoJson definition? With PostGIS support of GeoJson?
Versions:
"POSTGIS="2.1.2 r12389" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.9.1" LIBJSON="UNKNOWN" RASTER"
"PostgreSQL 9.3.24 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4, 64-bit"
postgis geojson 4d
postgis geojson 4d
asked Nov 20 at 8:36
Ronen
17611
17611
1
Read the second comment on this question. According to RFC 7946 “Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp (...) additional elements MAY be ignored by parsers.”
– thibautg
Nov 22 at 8:26
add a comment |
1
Read the second comment on this question. According to RFC 7946 “Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp (...) additional elements MAY be ignored by parsers.”
– thibautg
Nov 22 at 8:26
1
1
Read the second comment on this question. According to RFC 7946 “Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp (...) additional elements MAY be ignored by parsers.”
– thibautg
Nov 22 at 8:26
Read the second comment on this question. According to RFC 7946 “Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp (...) additional elements MAY be ignored by parsers.”
– thibautg
Nov 22 at 8:26
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53389045%2f4d-data-in-geojson-in-postgis%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Read the second comment on this question. According to RFC 7946 “Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp (...) additional elements MAY be ignored by parsers.”
– thibautg
Nov 22 at 8:26