What is the proper type for columns holding GeoJSON?
What data type do you prefer for columns holding GeoJSON information, in the major RDBMS families (i.e. Oracle DB, PostgreSQL, MySQL, SQL Server, SQLite, DB2..?
In general, do you prefer / is better using large object columns (e.g. CLOB
of Oracle DB) or do you prefer / is better using data types from the character / text family (e.g. text
in PostgreSQL or character varying (with unspecified length)
in PostgreSQL too)?
Can you be so clever, experienced or knowledgeable even to assert whether the answer depends on the max GeoJSON character length in the table, or not? or maybe the median value or something else?
Spoiler for X/Y problem fans follows!
For the X/Y problem fans, my X question to this Y question would be:
Which is the proper way of migrating data held in Oracle spatial in production to PostGIS?, but I guess the answer to my X question is kind of a time evolving one, while I guess the answer to my Y question is more of a constant (even almost axiomatic) one.
I would have created the geojson tag if I already could, but I can not yet so I tag as JSON.
migration json spatial geojson
add a comment |
What data type do you prefer for columns holding GeoJSON information, in the major RDBMS families (i.e. Oracle DB, PostgreSQL, MySQL, SQL Server, SQLite, DB2..?
In general, do you prefer / is better using large object columns (e.g. CLOB
of Oracle DB) or do you prefer / is better using data types from the character / text family (e.g. text
in PostgreSQL or character varying (with unspecified length)
in PostgreSQL too)?
Can you be so clever, experienced or knowledgeable even to assert whether the answer depends on the max GeoJSON character length in the table, or not? or maybe the median value or something else?
Spoiler for X/Y problem fans follows!
For the X/Y problem fans, my X question to this Y question would be:
Which is the proper way of migrating data held in Oracle spatial in production to PostGIS?, but I guess the answer to my X question is kind of a time evolving one, while I guess the answer to my Y question is more of a constant (even almost axiomatic) one.
I would have created the geojson tag if I already could, but I can not yet so I tag as JSON.
migration json spatial geojson
Upgrading from Oracle to PostGIS is totally cool, but I would drop the shout out to every other database. That makes this not a Q/A but a polling question. Consider making the question specific to PostgreSQL and Oracle.
– Evan Carroll
May 17 '17 at 18:35
add a comment |
What data type do you prefer for columns holding GeoJSON information, in the major RDBMS families (i.e. Oracle DB, PostgreSQL, MySQL, SQL Server, SQLite, DB2..?
In general, do you prefer / is better using large object columns (e.g. CLOB
of Oracle DB) or do you prefer / is better using data types from the character / text family (e.g. text
in PostgreSQL or character varying (with unspecified length)
in PostgreSQL too)?
Can you be so clever, experienced or knowledgeable even to assert whether the answer depends on the max GeoJSON character length in the table, or not? or maybe the median value or something else?
Spoiler for X/Y problem fans follows!
For the X/Y problem fans, my X question to this Y question would be:
Which is the proper way of migrating data held in Oracle spatial in production to PostGIS?, but I guess the answer to my X question is kind of a time evolving one, while I guess the answer to my Y question is more of a constant (even almost axiomatic) one.
I would have created the geojson tag if I already could, but I can not yet so I tag as JSON.
migration json spatial geojson
What data type do you prefer for columns holding GeoJSON information, in the major RDBMS families (i.e. Oracle DB, PostgreSQL, MySQL, SQL Server, SQLite, DB2..?
In general, do you prefer / is better using large object columns (e.g. CLOB
of Oracle DB) or do you prefer / is better using data types from the character / text family (e.g. text
in PostgreSQL or character varying (with unspecified length)
in PostgreSQL too)?
Can you be so clever, experienced or knowledgeable even to assert whether the answer depends on the max GeoJSON character length in the table, or not? or maybe the median value or something else?
Spoiler for X/Y problem fans follows!
For the X/Y problem fans, my X question to this Y question would be:
Which is the proper way of migrating data held in Oracle spatial in production to PostGIS?, but I guess the answer to my X question is kind of a time evolving one, while I guess the answer to my Y question is more of a constant (even almost axiomatic) one.
I would have created the geojson tag if I already could, but I can not yet so I tag as JSON.
migration json spatial geojson
migration json spatial geojson
edited 5 hours ago
Evan Carroll
31.6k965213
31.6k965213
asked May 17 '17 at 18:09
upregouprego
3011316
3011316
Upgrading from Oracle to PostGIS is totally cool, but I would drop the shout out to every other database. That makes this not a Q/A but a polling question. Consider making the question specific to PostgreSQL and Oracle.
– Evan Carroll
May 17 '17 at 18:35
add a comment |
Upgrading from Oracle to PostGIS is totally cool, but I would drop the shout out to every other database. That makes this not a Q/A but a polling question. Consider making the question specific to PostgreSQL and Oracle.
– Evan Carroll
May 17 '17 at 18:35
Upgrading from Oracle to PostGIS is totally cool, but I would drop the shout out to every other database. That makes this not a Q/A but a polling question. Consider making the question specific to PostgreSQL and Oracle.
– Evan Carroll
May 17 '17 at 18:35
Upgrading from Oracle to PostGIS is totally cool, but I would drop the shout out to every other database. That makes this not a Q/A but a polling question. Consider making the question specific to PostgreSQL and Oracle.
– Evan Carroll
May 17 '17 at 18:35
add a comment |
1 Answer
1
active
oldest
votes
What is the proper type for columns holding GeoJSON?
In PostgreSQL, as JSONB (ideally), or JSON.
Which is the proper way of migrating data held in Oracle spatial in production to PostGIS?
As "Well-Known Binary", (WKB) using Get_WKB
. Or simply using oracle_fdw
which solves most of these problems and uses WKB behind the scenes.
The only supported geometry types are
POINT
,LINE
,POLYGON
,MULTIPOINT
,MULTILINE
andMULTIPOLYGON
in two and three dimensions. Empty PostGIS geometries are not supported because they have no equivalent in Oracle Spatial.
Moreover on the subject of GeoJSON, PostGIS provides ST_GeomFromGeoJSON
, and ST_AsGeoJSON
if you want to use GeoJSON.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2fdba.stackexchange.com%2fquestions%2f173856%2fwhat-is-the-proper-type-for-columns-holding-geojson%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
What is the proper type for columns holding GeoJSON?
In PostgreSQL, as JSONB (ideally), or JSON.
Which is the proper way of migrating data held in Oracle spatial in production to PostGIS?
As "Well-Known Binary", (WKB) using Get_WKB
. Or simply using oracle_fdw
which solves most of these problems and uses WKB behind the scenes.
The only supported geometry types are
POINT
,LINE
,POLYGON
,MULTIPOINT
,MULTILINE
andMULTIPOLYGON
in two and three dimensions. Empty PostGIS geometries are not supported because they have no equivalent in Oracle Spatial.
Moreover on the subject of GeoJSON, PostGIS provides ST_GeomFromGeoJSON
, and ST_AsGeoJSON
if you want to use GeoJSON.
add a comment |
What is the proper type for columns holding GeoJSON?
In PostgreSQL, as JSONB (ideally), or JSON.
Which is the proper way of migrating data held in Oracle spatial in production to PostGIS?
As "Well-Known Binary", (WKB) using Get_WKB
. Or simply using oracle_fdw
which solves most of these problems and uses WKB behind the scenes.
The only supported geometry types are
POINT
,LINE
,POLYGON
,MULTIPOINT
,MULTILINE
andMULTIPOLYGON
in two and three dimensions. Empty PostGIS geometries are not supported because they have no equivalent in Oracle Spatial.
Moreover on the subject of GeoJSON, PostGIS provides ST_GeomFromGeoJSON
, and ST_AsGeoJSON
if you want to use GeoJSON.
add a comment |
What is the proper type for columns holding GeoJSON?
In PostgreSQL, as JSONB (ideally), or JSON.
Which is the proper way of migrating data held in Oracle spatial in production to PostGIS?
As "Well-Known Binary", (WKB) using Get_WKB
. Or simply using oracle_fdw
which solves most of these problems and uses WKB behind the scenes.
The only supported geometry types are
POINT
,LINE
,POLYGON
,MULTIPOINT
,MULTILINE
andMULTIPOLYGON
in two and three dimensions. Empty PostGIS geometries are not supported because they have no equivalent in Oracle Spatial.
Moreover on the subject of GeoJSON, PostGIS provides ST_GeomFromGeoJSON
, and ST_AsGeoJSON
if you want to use GeoJSON.
What is the proper type for columns holding GeoJSON?
In PostgreSQL, as JSONB (ideally), or JSON.
Which is the proper way of migrating data held in Oracle spatial in production to PostGIS?
As "Well-Known Binary", (WKB) using Get_WKB
. Or simply using oracle_fdw
which solves most of these problems and uses WKB behind the scenes.
The only supported geometry types are
POINT
,LINE
,POLYGON
,MULTIPOINT
,MULTILINE
andMULTIPOLYGON
in two and three dimensions. Empty PostGIS geometries are not supported because they have no equivalent in Oracle Spatial.
Moreover on the subject of GeoJSON, PostGIS provides ST_GeomFromGeoJSON
, and ST_AsGeoJSON
if you want to use GeoJSON.
edited 5 hours ago
answered May 17 '17 at 18:32
Evan CarrollEvan Carroll
31.6k965213
31.6k965213
add a comment |
add a comment |
Thanks for contributing an answer to Database Administrators Stack Exchange!
- 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%2fdba.stackexchange.com%2fquestions%2f173856%2fwhat-is-the-proper-type-for-columns-holding-geojson%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
Upgrading from Oracle to PostGIS is totally cool, but I would drop the shout out to every other database. That makes this not a Q/A but a polling question. Consider making the question specific to PostgreSQL and Oracle.
– Evan Carroll
May 17 '17 at 18:35