我指的是一個教程,是php.I是在轉換成C#.The事情是,他們已經在這個皈依數據表/數據集的給定陣列
SELECT ST_AsText(
ST_Union(
ST_Difference(
ST_Buffer(ST_GeometryFromText('POINT(0 0)', 4326), 30),
ST_Envelope(
ST_Buffer(ST_GeometryFromText('POINT(0 0)', 4326), 10)
)
),
ST_Envelope(
ST_Buffer(ST_GeometryFromText('POINT(-55 -55)', 4326), 10)
)
)
);
使用
我的查詢
在PostgreSQL的執行後的結果是
"MULTIPOLYGON(((30 0,29.4235584120969 -5.85270966048384,27.7163859753386 -11.4805029709527,24.9440883690764 -16.6671069905881,21.2132034355964 -21.2132034355964,16.6671069905881 -24.9440883690763,11.4805029709527 -27.7163859753386,5.85270966048389 -29.4235584120969,4.84662765649901e-014 -30,-5.85270966048379 -29.4235584120969,-11.4805029709526 -27.7163859753386,-16.667106990588 -24.9440883690764,-21.2132034355964 -21.2132034355965,-24.9440883690763 -16.6671069905881,-27.7163859753386 -11.4805029709528,-29.4235584120969 -5.85270966048394,-30 -9.69325531299803e-014,-29.4235584120969 5.85270966048375,-27.7163859753386 11.4805029709526,-24.9440883690764 16.667106990588,-21.2132034355965 21.2132034355963,-16.6671069905882 24.9440883690763,-11.4805029709528 27.7163859753386,-5.85270966048396 29.4235584120969,-1.12092138956216e-013 30,5.85270966048374 29.4235584120969,11.4805029709526 27.7163859753386,16.667106990588 24.9440883690764,21.2132034355964 21.2132034355965,24.9440883690763 16.6671069905881,27.7163859753386 11.4805029709528,29.4235584120969 5.85270966048391,30 0),(-10 -10,10 -10,10 10,-10 10,-10 -10)),((-65 -65,-65 -45,-45 -45,-45 -65,-65 -65)))";
現在這我的PHP後做的這種轉換是陣列(其給定的系統的數據錶轉換成陣列)
$arr = pg_fetch_array($res);
現在我想寫一個類似的功能,哪個PHP呢? 但無法正確轉換
我的功能看起來像這樣
public Array FetchArray(DataTable Dt)
{
int[] array;
Array arr = new Array[];
Array converted = new Array(Dt.Rows.Count);
foreach (DataRow row in Dt.Rows)
{
arr.Add(row);//here it should convert the system DataTable into sytem array
}
return arr;
}
有人請幫助我。 在此先感謝。
您正在使用什麼版本的.NET Framework? – tstuts 2012-02-27 04:30:17
@tstuts我正在使用Microsoft Visual Studio 2010 .net版本3.5 – user1118700 2012-02-27 04:36:34