I am stuck converting a geometry(MultiLineString) into coordinates. The following I did.
I download the data from this Austin Contours data link
I import the shape files using PGAdmin III and inserted around 894345 data.
In last column I got the following geom MultiLineString.
01050000000100000001020000002C00000000000080189B47419A9999D95F3C6341C2F528DC089B4741E17A14E65F3C6341A4703D2A079B47418FC2F5E85F3C634152B81EC5059B4741000000F05F3C634148E17AB4049B4741713D0AF75F3C634100000060039B474100000000603C63411E85EBB1019B47413E0AD723603C634133333313009B474152B81E3D603C6341E27A14EEFF9A4741E17A143E603C6341D7A3703DFE9A4741D7A37045603C63413E0AD703FC9A47419A999949603C63410AD7A3D0FA9A4741D7A37045603C63411E85EB31F89A47417B14AE2F603C6341F6285CCFF79A47410AD7A330603C634185EB5118F69A4741AE47E13A603C6341E27A140EF49A4741C2F5284C603C6341000000E0F39A4741E17A144E603C63419A9999F9F19A4741F6285C67603C6341703D0AF7F09A4741713D0A77603C634148E17AF4EF9A4741295C8F82603C6341B81E856BEF9A47415C8FC285603C63417B14AE67EE9A47417B14AE87603C634190C2F5A8EC9A4741EC51B88E603C63417B14AE27EB9A4741333333A3603C634190C2F528E99A4741E17A14C6603C63413E0AD723E19A4741A4703D82613C63410AD7A350DF9A474152B81EB5613C634166666666DE9A474148E17AD4613C634166666626DD9A47418FC2F500623C634152B81E85DB9A4741E17A1436623C63413E0AD723DA9A474100000060623C634100000020D99A47415C8FC27D623C634114AE4781D79A4741666666A6623C634100000040D69A4741AE47E1C2623C6341703D0AD7D49A4741EC51B8DE623C6341C2F5283CD09A474133333333633C6341EC51B8FECE9A4741CDCCCC4C633C6341333333B3CD9A47416666666E633C6341D7A3705DCC9A4741B81E8593633C63410AD7A3B0C99A4741EC51B8DE633C6341C2F5289CC89A47417B14AEFF633C63415C8FC2B5C69A4741B81E854B643C6341E27A14AEC59A4741EC51B876643C634185EB5118C59A47419A999991643C6341
When I converted this into coordinates from online link it gives the wrong coordinated data as given below
{"type":"MultiLineString","coordinates":[[[3094065,10085118.8],[3094033.7199999997,10085119.19],[3094030.33,10085119.28],[3094027.54,10085119.5],[3094025.41,10085119.72],[3094022.75,10085120],[3094019.3899999997,10085121.120000001],[3094016.15,10085121.91],[3094015.8600000003,10085121.94],[3094012.48,10085122.17],[3094008.0300000003,10085122.3],[3094005.63,10085122.17],[3094000.3899999997,10085121.49],[3093999.62,10085121.52],[3093996.19,10085121.84],[3093992.1100000003,10085122.379999999],[3093991.75,10085122.44],[3093987.95,10085123.23],[3093985.9299999997,10085123.72],[3093983.91,10085124.08],[3093982.84,10085124.18],[3093980.81,10085124.24],[3093977.3200000003,10085124.46],[3093974.31,10085125.1],[3093970.3200000003,10085126.19],[3093954.2800000003,10085132.07],[3093950.63,10085133.66],[3093948.8,10085134.64],[3093946.3,10085136.03],[3093943.04,10085137.69],[3093940.2800000003,10085139],[3093938.25,10085139.93],[3093935.01,10085141.2],[3093932.5,10085142.09],[3093929.6799999997,10085142.96],[3093920.4699999997,10085145.6],[3093917.99,10085146.4],[3093915.4,10085147.45],[3093912.73,10085148.61],[3093907.38,10085150.96],[3093905.2199999997,10085151.99],[3093901.42,10085154.36],[3093899.3600000003,10085155.71],[3093898.19,10085156.55]]]}
Which is not the lat long. I didn't understand why I getting this I am using the following query to get the data from the PostgreSQL database tables.
BEGIN
SELECT row_to_json(fc.*) as dparcel into ac
FROM
(
SELECT 'FeatureCollection' AS type,
array_to_json(array_agg(f.*)) AS features
FROM
(
SELECT 'Feature' AS type,
(
SELECT row_to_json(t) as properties
FROM
(
select * from austin.austin_contours WHERE gid = adp.gid
) t
),
ST_AsGeoJSON(geom)::json as geometry
FROM austin.austin_contours adp
LIMIT 20
) f
) fc;
return;
END;
Here geom is the column name of austin.austin_contours table.